From 1791e7ca5480b33709c85a85926bc424fa142c24 Mon Sep 17 00:00:00 2001 From: favreau Date: Wed, 25 Nov 2009 14:58:23 +0000 Subject: [PATCH] *** empty log message *** --- cmake/CREAMacro_FindAndUseLibraries.cmake | 114 +++++++++++++--------- 1 file changed, 66 insertions(+), 48 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index e55bce9..668dadc 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -266,59 +266,77 @@ ENDIF(USE_TTH) #----------------------------------------------------------------------------- IF(USE_BOOST) IF(NOT Boost_FOUND) - FIND_PACKAGE(Boost 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} ) + + find_package( Boost 1.37.0 COMPONENTS signals date_time filesystem system ) + + 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} ) + #target_link_libraries(${Boost_LIBRARIES}) + ELSE(Boost_FOUND) + MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers") + ENDIF(Boost_FOUND) + # CREA_DEFINE( USE_BOOST ) +# include_directories(${Boost_INCLUDE_DIRS}) + # add_executable(foo foo.cc) + # target_link_libraries(foo ${Boost_LIBRARIES}) + # endif() + + # FIND_PACKAGE(Boost 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} ) - CREA_DEFINE( USE_BOOST ) - IF(WIN32) + # CREA_DEFINE( USE_BOOST ) + # IF(WIN32) - LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) #JCP 01/10/2009 - #LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS}) - #MESSAGE ("EED " ${Boost_LIBRARY_DIRS}) - #libboost_signals-vc71-mt-1_37 - #libboost_filesystem-vc71-mt-1_37 - #boost_date_time-vc71-mt-1_37 + # LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) #JCP 01/10/2009 + # #LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS}) + # #MESSAGE ("EED " ${Boost_LIBRARY_DIRS}) + # #libboost_signals-vc71-mt-1_37 + # #libboost_filesystem-vc71-mt-1_37 + # #boost_date_time-vc71-mt-1_37 - #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}") - SET(BOOST_LIBRARIES - boost_signals-vc90-mt-1_40 - boost_filesystem-vc90-mt-1_40 - boost_date_time-vc90-mt-1_40 + # #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}") + # SET(BOOST_LIBRARIES + # boost_signals-vc90-mt-1_40 + # boost_filesystem-vc90-mt-1_40 + # boost_date_time-vc90-mt-1_40 - #what about boost_thread? JPR - ) - ENDIF(WIN32) - IF(NOT WIN32) - IF(APPLE) - SET(BOOST_LIBRARIES - boost_signals - boost_filesystem - boost_date_time - boost_program_options - boost_regex - boost_thread - ) - ELSE(NOT APPLE) - SET(BOOST_LIBRARIES - boost_signals-mt - boost_filesystem-mt - boost_date_time-mt - boost_system-mt - boost_program_options-mt - boost_regex-mt - boost_thread-mt - ) - ENDIF(APPLE) - ENDIF(NOT WIN32) + # #what about boost_thread? JPR + # ) + # ENDIF(WIN32) + # IF(NOT WIN32) + # IF(APPLE) + # SET(BOOST_LIBRARIES + # boost_signals + # boost_filesystem + # boost_date_time + # boost_program_options + # boost_regex + # boost_thread + # ) + # ELSE(NOT APPLE) + # SET(BOOST_LIBRARIES + # boost_signals-mt + # boost_filesystem-mt + # boost_date_time-mt + # boost_system-mt + # boost_program_options-mt + # boost_regex-mt + # boost_thread-mt + # ) + # ENDIF(APPLE) + # ENDIF(NOT WIN32) - MARK_AS_ADVANCED(Boost_INCLUDE_DIR) - ELSE(Boost_FOUND) - MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers") - ENDIF(Boost_FOUND) + # MARK_AS_ADVANCED(Boost_INCLUDE_DIR) + # ELSE(Boost_FOUND) + # MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers") + # ENDIF(Boost_FOUND) ENDIF(NOT Boost_FOUND) ENDIF(USE_BOOST) #----------------------------------------------------------------------------- -- 2.45.1