From 40891c11241f7f53202a28fb5d9b4367a287f979 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 11 Feb 2013 09:50:23 +0100 Subject: [PATCH] Bug #1912 BOOST conflict between static and dynamic libraries --- cmake/CREAMacro_FindAndUseLibraries.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index ff0a41b..6d9e416 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -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 # -- 2.47.1