2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# FindRTI
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# Try to find M&S HLA RTI libraries
|
|
|
|
#
|
|
|
|
# This module finds if any HLA RTI is installed and locates the standard
|
|
|
|
# RTI include files and libraries.
|
|
|
|
#
|
|
|
|
# RTI is a simulation infrastructure standardized by IEEE and SISO. It
|
|
|
|
# has a well defined C++ API that assures that simulation applications
|
|
|
|
# are independent on a particular RTI implementation.
|
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation)
|
|
|
|
#
|
2008-10-25 20:20:03 +04:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# This code sets the following variables:
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# RTI_INCLUDE_DIR = the directory where RTI includes file are found
|
|
|
|
# RTI_LIBRARIES = The libraries to link against to use RTI
|
|
|
|
# RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM
|
|
|
|
# RTI_FOUND = Set to FALSE if any HLA RTI was not found
|
|
|
|
#
|
|
|
|
#
|
2008-10-25 20:20:03 +04:00
|
|
|
#
|
|
|
|
# Report problems to <certi-devel@nongnu.org>
|
|
|
|
|
2009-09-28 19:45:50 +04:00
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2008-2009 Kitware, Inc.
|
|
|
|
# Copyright 2008 Petr Gotthard <gotthard@honeywell.com>
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 04:48:47 +04:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 19:45:50 +04:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
macro(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
|
|
|
|
if(NOT ${QUIET})
|
|
|
|
message(${TYPE} "${MSG}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endmacro()
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM")
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-03-29 02:00:54 +04:00
|
|
|
# Detect the CERTI installation, http://www.cert.fr/CERTI
|
2008-10-25 20:20:03 +04:00
|
|
|
# Detect the MAK Technologies RTI installation, http://www.mak.com/products/rti.php
|
|
|
|
# note: the following list is ordered to find the most recent version first
|
2012-08-13 21:47:32 +04:00
|
|
|
set(RTI_POSSIBLE_DIRS
|
2012-03-29 02:00:54 +04:00
|
|
|
ENV CERTI_HOME
|
2008-10-25 20:20:03 +04:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 3.2 MSVC++ 8.0;Location]"
|
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 3.2-win32-msvc++8.0;InstallLocation]"
|
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 2.2;Location]"
|
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 2.2;InstallLocation]")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(RTI_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
|
2008-10-25 20:20:03 +04:00
|
|
|
# The MAK RTI has the "lib" prefix even on Windows.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_library(RTI_LIBRARY
|
2008-10-25 20:20:03 +04:00
|
|
|
NAMES RTI RTI-NG
|
|
|
|
PATHS ${RTI_POSSIBLE_DIRS}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
DOC "The RTI Library")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (RTI_LIBRARY)
|
|
|
|
set(RTI_LIBRARIES ${RTI_LIBRARY})
|
2008-10-25 20:20:03 +04:00
|
|
|
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library found: ${RTI_LIBRARY}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2008-10-25 20:20:03 +04:00
|
|
|
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library NOT found")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_library(RTI_FEDTIME_LIBRARY
|
2008-10-25 20:20:03 +04:00
|
|
|
NAMES FedTime
|
|
|
|
PATHS ${RTI_POSSIBLE_DIRS}
|
|
|
|
PATH_SUFFIXES lib
|
|
|
|
DOC "The FedTime Library")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (RTI_FEDTIME_LIBRARY)
|
|
|
|
set(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
|
2008-10-25 20:20:03 +04:00
|
|
|
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI FedTime found: ${RTI_FEDTIME_LIBRARY}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_path(RTI_INCLUDE_DIR
|
2008-10-25 20:20:03 +04:00
|
|
|
NAMES RTI.hh
|
|
|
|
PATHS ${RTI_POSSIBLE_DIRS}
|
|
|
|
PATH_SUFFIXES include
|
|
|
|
DOC "The RTI Include Files")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (RTI_INCLUDE_DIR)
|
2008-10-25 20:20:03 +04:00
|
|
|
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers found: ${RTI_INCLUDE_DIR}")
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2008-10-25 20:20:03 +04:00
|
|
|
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers NOT found")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2008-10-25 20:20:03 +04:00
|
|
|
|
|
|
|
# Set the modified system variables back to the original value.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
|
2008-10-25 20:20:03 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
2008-10-25 20:20:03 +04:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
|
|
|
|
RTI_LIBRARY RTI_INCLUDE_DIR)
|
|
|
|
|
|
|
|
# $Id$
|