[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi CMakeLists.txt scripts/FindRTI.cmake
From: |
certi-cvs |
Subject: |
[certi-cvs] certi CMakeLists.txt scripts/FindRTI.cmake |
Date: |
Sat, 23 Jan 2010 11:24:04 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Petr Gotthard <gotthardp> 10/01/23 11:24:04
Modified files:
. : CMakeLists.txt
scripts : FindRTI.cmake
Log message:
Support both debug and release libraries.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/CMakeLists.txt?cvsroot=certi&r1=1.79&r2=1.80
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/FindRTI.cmake?cvsroot=certi&r1=1.9&r2=1.10
Patches:
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/CMakeLists.txt,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- CMakeLists.txt 16 Jan 2010 19:44:13 -0000 1.79
+++ CMakeLists.txt 23 Jan 2010 11:24:04 -0000 1.80
@@ -74,6 +74,7 @@
SET(CMAKE_BUILD_TYPE "Debug")
ENDIF(NOT CMAKE_BUILD_TYPE)
+SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "debug library postfix, usually d on
windows")
# Force CMAKE_COMPILER_IS_GNUCC even if gcc used with ccache
IF("${CMAKE_C_COMPILER}" MATCHES "ccache")
Index: scripts/FindRTI.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/FindRTI.cmake,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- scripts/FindRTI.cmake 24 Nov 2008 12:21:59 -0000 1.9
+++ scripts/FindRTI.cmake 23 Jan 2010 11:24:04 -0000 1.10
@@ -2,7 +2,7 @@
# This module finds if any HLA RTI is installed and locates the standard RTI
# include files and libraries.
#
-# RTI is a simulation infrastructure standartized by IEEE and SISO. It has a
+# 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)
@@ -48,36 +48,59 @@
NAMES RTI-NG RTI
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
- DOC "The RTI Library")
+ DOC "The HLA 1.3 RTI Library")
-IF (RTI_LIBRARY)
- SET(RTI_LIBRARIES ${RTI_LIBRARY})
- RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library found:
${RTI_LIBRARY}")
-ELSE (RTI_LIBRARY)
- RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library NOT found")
-ENDIF (RTI_LIBRARY)
+FIND_LIBRARY(RTI_LIBRARY_DEBUG
+ NAMES RTI-NGd RTId
+ PATHS ${RTI_POSSIBLE_DIRS}
+ PATH_SUFFIXES lib
+ DOC "The HLA 1.3 RTI Debug Library")
+
+MACRO(RTI_SET_LIBRARIES VAR_LIBRARIES VAR_RELEASELIB VAR_DEBUGLIB MESSAGE)
+ IF(${VAR_RELEASELIB} AND ${VAR_DEBUGLIB})
+ SET(${VAR_LIBRARIES} optimized ${${VAR_RELEASELIB}} debug
${${VAR_DEBUGLIB}})
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "${MESSAGE} found:
${${VAR_RELEASELIB}} ${${VAR_DEBUGLIB}}")
+ ELSE(${VAR_RELEASELIB} AND ${VAR_DEBUGLIB})
+ IF(${VAR_RELEASELIB})
+ SET(${VAR_LIBRARIES} ${${VAR_RELEASELIB}})
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "${MESSAGE} found:
${${VAR_RELEASELIB}}")
+ ELIF(${VAR_DEBUGLIB})
+ SET(${VAR_LIBRARIES} ${${VAR_DEBUGLIB}})
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "${MESSAGE} found:
${${VAR_DEBUGLIB}}")
+ ELSE(${VAR_RELEASELIB})
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "${MESSAGE} NOT found")
+ ENDIF(${VAR_RELEASELIB})
+ ENDIF(${VAR_RELEASELIB} AND ${VAR_DEBUGLIB})
+ENDMACRO(RTI_SET_LIBRARIES)
+
+RTI_SET_LIBRARIES(
+ RTI_LIBRARIES RTI_LIBRARY RTI_LIBRARY_DEBUG "HLA 1.3 RTI library")
FIND_LIBRARY(RTI_FEDTIME_LIBRARY
NAMES FedTime
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
- DOC "The FedTime Library")
+ DOC "The HLA 1.3 FedTime Library")
-IF (RTI_FEDTIME_LIBRARY)
- SET(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
- RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI FedTime found:
${RTI_FEDTIME_LIBRARY}")
-ENDIF (RTI_FEDTIME_LIBRARY)
+FIND_LIBRARY(RTI_FEDTIME_LIBRARY_DEBUG
+ NAMES FedTimed
+ PATHS ${RTI_POSSIBLE_DIRS}
+ PATH_SUFFIXES lib
+ DOC "The HLA 1.3 FedTime Debug Library")
+
+RTI_SET_LIBRARIES(
+ RTI_FEDTIME_LIBRARIES RTI_FEDTIME_LIBRARY RTI_FEDTIME_LIBRARY_DEBUG "HLA 1.3
RTI FedTime")
FIND_PATH(RTI_INCLUDE_DIR
NAMES RTI.hh
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES include
- DOC "The RTI Include Files")
+ DOC "The HLA 1.3 RTI Include Files")
IF (RTI_INCLUDE_DIR)
- RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers found:
${RTI_INCLUDE_DIR}")
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "HLA 1.3 RTI headers found:
${RTI_INCLUDE_DIR}")
ELSE (RTI_INCLUDE_DIR)
- RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers NOT found")
+ RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "HLA 1.3 RTI headers NOT found")
ENDIF (RTI_INCLUDE_DIR)
FIND_PROGRAM(CERTI_RTIG_EXECUTABLE
@@ -103,13 +126,16 @@
# Set the modified system variables back to the original value.
SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
-IF (RTI_LIBRARY AND RTI_INCLUDE_DIR)
+IF (RTI_LIBRARIES AND RTI_INCLUDE_DIR)
SET(RTI_FOUND TRUE)
-ELSE (RTI_LIBRARY AND RTI_INCLUDE_DIR)
+ELSE (RTI_LIBRARIES AND RTI_INCLUDE_DIR)
SET(RTI_FOUND FALSE)
IF (RTI_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "No RTI found! Please install a HLA RTI and re-run.")
ENDIF (RTI_FIND_REQUIRED)
-ENDIF(RTI_LIBRARY AND RTI_INCLUDE_DIR)
+ENDIF(RTI_LIBRARIES AND RTI_INCLUDE_DIR)
+
+SET(RTI_LIBRARIES
+ ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARIES})
-# $Id: FindRTI.cmake,v 1.9 2008/11/24 12:21:59 gotthardp Exp $
+# $Id: FindRTI.cmake,v 1.10 2010/01/23 11:24:04 gotthardp Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi CMakeLists.txt scripts/FindRTI.cmake,
certi-cvs <=