]> Creatis software - crea.git/commitdiff
*** empty log message *** CREATOOLS.2-0-3
authorFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Thu, 23 Sep 2010 12:18:23 +0000 (12:18 +0000)
committerFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Thu, 23 Sep 2010 12:18:23 +0000 (12:18 +0000)
cmake/CREAMacro_FindAndUseLibraries.cmake

index 08153c0c24305fbe5a0f932f38eff9a2bd90ef29..523c261a26615141758eb969d39cc1d1562faa06 100644 (file)
@@ -268,36 +268,46 @@ ENDIF(USE_TTH)
 #-----------------------------------------------------------------------------
 
 #-----------------------------------------------------------------------------
+
 IF(USE_BOOST)
+message(STATUS "1")
   IF(NOT Boost_FOUND)
-    FIND_PACKAGE(Boost REQUIRED)
+      FIND_PACKAGE(Boost COMPONENTS filesystem  signals date_time regex REQUIRED)
     IF(Boost_FOUND)
+       message(STATUS "1 bis")
       MESSAGE ( STATUS "=======================================")
       MESSAGE ( STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}")
       INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})        
-      LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
-
-      CREA_DEFINE( USE_BOOST )
+                       LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS}) 
          IF(WIN32)
+         message("creamacro find and use lib = ${Boost_LIBRARIES}")
+       
+
+               CREA_DEFINE( USE_BOOST )
                
-               LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/Bin/lib) 
-               #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}")
-               IF(USE_DEBUG_LIB)
-                       SET(BOOST_LIBRARIES
-                               boost_signals-vc90-mt-gd-1_40
-                               boost_filesystem-vc90-mt-gd-1_40
-                               boost_date_time-vc90-mt-gd-1_40                    
-                          #what about boost_thread? JPR
+               SET(BOOST_LIBRARIES
+                       ${Boost_LIBRARIES}
                        )
-               ELSE(NOT USE_DEBUG_LIB)
-                       SET(BOOST_LIBRARIES
-                               boost_signals-vc90-mt-1_40
-                               boost_filesystem-vc90-mt-1_40
-                               boost_date_time-vc90-mt-1_40
-                       )
-               ENDIF(USE_DEBUG_LIB)
+# FCY with cmake boost, it's useless. 
+# But if it is not working, uncomment  
+#
+#      IF(USE_DEBUG_LIB)
+#                      SET(BOOST_LIBRARIES
+#                              boost_signals-vc90-mt-gd-1_40
+#                              boost_filesystem-vc90-mt-gd-1_40
+#                              boost_date_time-vc90-mt-gd-1_40                    
+#                         #what about boost_thread? JPR
+#                      )
+#              ELSE(NOT USE_DEBUG_LIB)
+#                      SET(BOOST_LIBRARIES
+#                              boost_signals-vc90-mt-1_40
+#                              boost_filesystem-vc90-mt-1_40
+#                              boost_date_time-vc90-mt-1_40
+#                      )
+#              ENDIF(USE_DEBUG_LIB)    
          ENDIF(WIN32)
       IF(NOT WIN32)
+
                  SET(BOOST_LIBRARIES
                        boost_signals-mt
                        boost_filesystem-mt
@@ -309,12 +319,18 @@ IF(USE_BOOST)
                        )
       ENDIF(NOT WIN32)
 
-      MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
+         MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
+         MARK_AS_ADVANCED(Boost_LIBRARY_DIRS)
+     
     ELSE(Boost_FOUND)
-      MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")
+       message(STATUS "2")
+      MESSAGE( "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")
     ENDIF(Boost_FOUND)
   ENDIF(NOT Boost_FOUND)
+  message("${Boost_FOUND}")
 ENDIF(USE_BOOST)
+#-----------------------------------------------------------
+
 #-----------------------------------------------------------------------------
 
 IF(USE_XERCES)