]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Compatibility boost 1.35 1.38
authoradam <adam>
Tue, 12 May 2009 14:51:24 +0000 (14:51 +0000)
committeradam <adam>
Tue, 12 May 2009 14:51:24 +0000 (14:51 +0000)
salome_adm/cmake_files/FindBOOST.cmake

index 581560ef74850ffbbb9e4aa989bd9247cba153ff..d46eb032aae0adb688e54e4a74823ea24c340f24 100644 (file)
@@ -102,26 +102,28 @@ IF(BOOST_STATUS)
 ENDIF(BOOST_STATUS)
 
 IF(BOOST_STATUS)
+  SET(BOOST_LIBS)
   IF(WINDOWS)
     IF(CMAKE_BUILD_TYPE STREQUAL Debug)
       SET(EXTENSION -gd)
     ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
       SET(EXTENSION)
     ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-    FIND_LIBRARY(BOOST_LIB_THREAD libboost_thread-vc90-mt${EXTENSION}-1_35 ${BOOST_LIB_PATHS})
-    FIND_LIBRARY(BOOST_LIB_DATE_TIME libboost_date_time-vc90-mt${EXTENSION}-1_35 ${BOOST_LIB_PATHS})
-    FIND_LIBRARY(BOOST_LIB_SIGNALS libboost_signals-vc90-mt${EXTENSION}-1_35 ${BOOST_LIB_PATHS})
-    FIND_LIBRARY(BOOST_LIB_FILESYSTEM libboost_filesystem-vc90-mt${EXTENSION}-1_35 ${BOOST_LIB_PATHS})
-    FIND_LIBRARY(BOOST_LIB_SYSTEM libboost_system-vc90-mt${EXTENSION}-1_35 ${BOOST_LIB_PATHS})
+    FOREACH(name thread date_time signals filesystem system)
+      SET(LIB_NAMES)
+      FOREACH(version 1_35 1_38)
+       SET(LIB_NAMES ${LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version})
+      ENDFOREACH(version 1_35 1_38)
+      FIND_LIBRARY(BOOST_LIB_${name} NAMES ${LIB_NAMES} PATHS ${BOOST_LIB_PATHS})
+      IF(NOT BOOST_LIB_${name})
+       SET(BOOST_STATUS 0)
+      ENDIF(NOT BOOST_LIB_${name})
+      SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_${name}})
+    ENDFOREACH(name thread date_time signals filesystem system)
   ELSE(WINDOWS)
     FIND_LIBRARY(BOOST_LIB_THREAD boost_thread ${BOOST_LIB_PATHS})
+    SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_THREAD})
   ENDIF(WINDOWS)
-  SET(BOOST_LIBS)
-  SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_THREAD})
-  SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_DATE_TIME})
-  SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_SIGNALS})
-  SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_FILESYSTEM})
-  SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_SYSTEM})
 ENDIF(BOOST_STATUS)
 
 # ------