]> Creatis software - crea.git/blobdiff - cmake/CREAMacro_FindAndUseLibraries.cmake
2299 crea Bug New Urgent Conflict with Boost (-mt not found) in fedora 20
[crea.git] / cmake / CREAMacro_FindAndUseLibraries.cmake
index f7c22a8668a0a475fde98129390b1fa0bf9db622..a80df2960eb90dac7cc74696da3d9c57871ddb5f 100644 (file)
@@ -309,18 +309,22 @@ ENDIF(USE_TTH)
 #-----------------------------------------------------------------------------
 IF(USE_BOOST)
   IF(NOT Boost_FOUND)
-      FIND_PACKAGE(Boost COMPONENTS filesystem  signals date_time regex REQUIRED)
-    IF(Boost_FOUND)
+       add_definitions( -DBOOST_ALL_NO_LIB )
+       add_definitions( -DBOOST_ALL_DYN_LINK )
+    FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time thread regex program_options REQUIRED)
+    IF(Boost_FOUND) 
+         ADD_DEFINITIONS(-DBOOST_FILESYSTEM_VERSION=3)
       MESSAGE ( STATUS "=======================================")
       MESSAGE ( STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}")
       INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})        
-                       LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS})
+         LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS})
          IF(WIN32)
                CREA_DEFINE( USE_BOOST )
                ADD_DEFINITIONS(-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
                SET(BOOST_LIBRARIES
                        ${Boost_LIBRARIES}
                        )
+                       
 # FCY with cmake boost, it's useless. 
 # But if it is not working, uncomment  
 #
@@ -344,9 +348,10 @@ IF(USE_BOOST)
                  SET(BOOST_LIBRARIES
 
                         ${Boost_LIBRARIES}
-                       boost_system-mt
-                       boost_thread-mt     
-                       boost_program_options-mt
+#EED 10 Fev 2014
+#EED                   boost_system-mt
+#EED                   boost_thread-mt     
+#EED                   boost_program_options-mt
 
 #EED 03 mars 2011
 #EED                   boost_signals-mt