1 # - Try to find M&S HLA RTI libraries
2 # This module finds if any HLA RTI is installed and locates the standard RTI
3 # include files and libraries.
5 # RTI is a simulation infrastructure standardized by IEEE and SISO. It has a
6 # well defined C++ API that assures that simulation applications are
7 # independent on a particular RTI implementation.
8 # http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation)
10 # This code sets the following variables:
11 # RTI_INCLUDE_DIR = the directory where RTI includes file are found
12 # RTI_LIBRARIES = The libraries to link against to use RTI
13 # RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM
14 # RTI_FOUND = Set to FALSE if any HLA RTI was not found
16 # Report problems to <certi-devel@nongnu.org>
18 MACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
20 MESSAGE(${TYPE} "${MSG}")
22 ENDMACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
24 # Detect the CERTI installation, http://www.cert.fr/CERTI
25 IF ("$ENV{CERTI_HOME}" STRGREATER "")
26 FILE(TO_CMAKE_PATH "$ENV{CERTI_HOME}" CERTI_HOME)
27 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "Using environment defined CERTI_HOME: ${CERTI_HOME}")
28 ENDIF ("$ENV{CERTI_HOME}" STRGREATER "")
30 SET(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM")
32 # Detect the MAK Technologies RTI installation, http://www.mak.com/products/rti.php
33 # note: the following list is ordered to find the most recent version first
36 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 3.2 MSVC++ 8.0;Location]"
37 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 3.2-win32-msvc++8.0;InstallLocation]"
38 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 2.2;Location]"
39 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 2.2;InstallLocation]")
41 SET(RTI_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
42 # The MAK RTI has the "lib" prefix even on Windows.
43 SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
45 FIND_LIBRARY(RTI_LIBRARY
47 PATHS ${RTI_POSSIBLE_DIRS}
49 DOC "The RTI Library")
52 SET(RTI_LIBRARIES ${RTI_LIBRARY})
53 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library found: ${RTI_LIBRARY}")
55 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library NOT found")
58 FIND_LIBRARY(RTI_FEDTIME_LIBRARY
60 PATHS ${RTI_POSSIBLE_DIRS}
62 DOC "The FedTime Library")
64 IF (RTI_FEDTIME_LIBRARY)
65 SET(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
66 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI FedTime found: ${RTI_FEDTIME_LIBRARY}")
67 ENDIF (RTI_FEDTIME_LIBRARY)
69 FIND_PATH(RTI_INCLUDE_DIR
71 PATHS ${RTI_POSSIBLE_DIRS}
73 DOC "The RTI Include Files")
76 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers found: ${RTI_INCLUDE_DIR}")
77 ELSE (RTI_INCLUDE_DIR)
78 RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers NOT found")
79 ENDIF (RTI_INCLUDE_DIR)
81 # Set the modified system variables back to the original value.
82 SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
84 INCLUDE(FindPackageHandleStandardArgs)
85 FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
86 RTI_LIBRARY RTI_INCLUDE_DIR)
88 # $Id: FindRTI.cmake,v 1.4 2009-04-19 16:47:00 alex Exp $