diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-16 17:57:19 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-16 17:57:19 -0800 |
commit | e11ced6bab02d8f548f424e0687b81e73769b9a7 (patch) | |
tree | a4df66ff8f96749838b8ba309d3b0e2fab29f257 /host | |
parent | 33f17fdcab91d7f71ffade26a48152dcc34ed14b (diff) | |
download | uhd-e11ced6bab02d8f548f424e0687b81e73769b9a7.tar.gz uhd-e11ced6bab02d8f548f424e0687b81e73769b9a7.tar.bz2 uhd-e11ced6bab02d8f548f424e0687b81e73769b9a7.zip |
uhd: boost linking + msvc configurable, defaults to static
Diffstat (limited to 'host')
-rw-r--r-- | host/CMakeLists.txt | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 523944355..e4f272a76 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -85,18 +85,12 @@ IF(MSVC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE ) - ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc ENDIF(MSVC) ######################################################################## # Setup Boost ######################################################################## -IF(UNIX AND EXISTS "/usr/lib64") - LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -ENDIF(UNIX AND EXISTS "/usr/lib64") - -SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44") -FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS +SET(BOOST_REQUIRED_COMPONENTS date_time filesystem program_options @@ -106,6 +100,22 @@ FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS unit_test_framework ) +IF(UNIX AND EXISTS "/usr/lib64") + LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix +ENDIF(UNIX AND EXISTS "/usr/lib64") + +IF(MSVC) + SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking") + IF(BOOST_ALL_DYN_LINK) + ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc + ELSE(BOOST_ALL_DYN_LINK) + UNSET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link + ENDIF(BOOST_ALL_DYN_LINK) +ENDIF(MSVC) + +SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44") +FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) |