Mercurial > hg > orthanc
diff Resources/CMake/BoostConfiguration.cmake @ 107:3b45473c0a73
replace boost::locale with iconv for debian
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Oct 2012 11:22:20 +0200 |
parents | 0ec5e2e327b1 |
children | 8c0a5666b05f |
line wrap: on
line diff
--- a/Resources/CMake/BoostConfiguration.cmake Wed Oct 03 17:53:23 2012 +0200 +++ b/Resources/CMake/BoostConfiguration.cmake Thu Oct 04 11:22:20 2012 +0200 @@ -1,23 +1,31 @@ if (${STATIC_BUILD}) SET(BOOST_STATIC 1) else() + include(FindBoost) + + SET(BOOST_STATIC 0) + set(Boost_DEBUG 1) + #set(Boost_USE_STATIC_LIBS ON) + find_package(Boost - COMPONENTS filesystem thread system locale) + COMPONENTS filesystem thread system) + + if (NOT Boost_FOUND) + message(FATAL_ERROR "Unable to locate Boost on this system") + endif() - if (${Boost_VERSION} LESS 104800) - # boost::locale is only available from 1.48.00 - message("Too old version of Boost (${Boost_LIB_VERSION}): Building the static version") - SET(BOOST_STATIC 1) - else() - SET(BOOST_STATIC 0) + #if (${Boost_VERSION} LESS 104800) + # boost::locale is only available from 1.48.00 + #message("Too old version of Boost (${Boost_LIB_VERSION}): Building the static version") + # SET(BOOST_STATIC 1) + #endif() - add_definitions( - -DBOOST_FILESYSTEM_VERSION=3 - ) + #add_definitions( + # -DBOOST_FILESYSTEM_VERSION=1 + # ) - include_directories(${Boost_INCLUDE_DIRS}) - link_libraries(${Boost_LIBRARIES}) - endif() + include_directories(${Boost_INCLUDE_DIRS}) + link_libraries(${Boost_LIBRARIES}) endif() @@ -71,6 +79,7 @@ -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_LOCALE_NO_LIB + -DBOOST_HAS_LOCALE=1 ) if (${CMAKE_COMPILER_IS_GNUCXX}) @@ -82,4 +91,8 @@ ) source_group(ThirdParty\\Boost REGULAR_EXPRESSION ${BOOST_SOURCES_DIR}/.*) +else() + add_definitions( + -DBOOST_HAS_LOCALE=0 + ) endif()