]> Creatis software - crea.git/commitdiff
Bug #1912
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 11 Feb 2013 08:50:23 +0000 (09:50 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 11 Feb 2013 08:50:23 +0000 (09:50 +0100)
BOOST conflict between static and dynamic libraries

cmake/CREAMacro_FindAndUseLibraries.cmake

index ff0a41be67d0fd5cba5d1e1ffc6df1f10d27d808..6d9e41603c95a126392434c67bbc431b6da53944 100644 (file)
@@ -309,18 +309,21 @@ ENDIF(USE_TTH)
 #-----------------------------------------------------------------------------
 IF(USE_BOOST)
   IF(NOT Boost_FOUND)
-      FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time regex REQUIRED)
+       add_definitions( -DBOOST_ALL_NO_LIB )
+       add_definitions( -DBOOST_ALL_DYN_LINK )
+    FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time regex REQUIRED)
     IF(Boost_FOUND)
       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  
 #