Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
106:332fec038d52 | 107:3b45473c0a73 |
---|---|
1 if (${STATIC_BUILD}) | 1 if (${STATIC_BUILD}) |
2 SET(BOOST_STATIC 1) | 2 SET(BOOST_STATIC 1) |
3 else() | 3 else() |
4 include(FindBoost) | |
5 | |
6 SET(BOOST_STATIC 0) | |
7 set(Boost_DEBUG 1) | |
8 #set(Boost_USE_STATIC_LIBS ON) | |
9 | |
4 find_package(Boost | 10 find_package(Boost |
5 COMPONENTS filesystem thread system locale) | 11 COMPONENTS filesystem thread system) |
6 | 12 |
7 if (${Boost_VERSION} LESS 104800) | 13 if (NOT Boost_FOUND) |
8 # boost::locale is only available from 1.48.00 | 14 message(FATAL_ERROR "Unable to locate Boost on this system") |
9 message("Too old version of Boost (${Boost_LIB_VERSION}): Building the static version") | 15 endif() |
10 SET(BOOST_STATIC 1) | |
11 else() | |
12 SET(BOOST_STATIC 0) | |
13 | 16 |
14 add_definitions( | 17 #if (${Boost_VERSION} LESS 104800) |
15 -DBOOST_FILESYSTEM_VERSION=3 | 18 # boost::locale is only available from 1.48.00 |
16 ) | 19 #message("Too old version of Boost (${Boost_LIB_VERSION}): Building the static version") |
20 # SET(BOOST_STATIC 1) | |
21 #endif() | |
17 | 22 |
18 include_directories(${Boost_INCLUDE_DIRS}) | 23 #add_definitions( |
19 link_libraries(${Boost_LIBRARIES}) | 24 # -DBOOST_FILESYSTEM_VERSION=1 |
20 endif() | 25 # ) |
26 | |
27 include_directories(${Boost_INCLUDE_DIRS}) | |
28 link_libraries(${Boost_LIBRARIES}) | |
21 endif() | 29 endif() |
22 | 30 |
23 | 31 |
24 if (BOOST_STATIC) | 32 if (BOOST_STATIC) |
25 SET(BOOST_NAME boost_1_49_0) | 33 SET(BOOST_NAME boost_1_49_0) |
69 -DBOOST_THREAD_BUILD_LIB | 77 -DBOOST_THREAD_BUILD_LIB |
70 -DBOOST_PROGRAM_OPTIONS_NO_LIB | 78 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
71 -DBOOST_REGEX_NO_LIB | 79 -DBOOST_REGEX_NO_LIB |
72 -DBOOST_SYSTEM_NO_LIB | 80 -DBOOST_SYSTEM_NO_LIB |
73 -DBOOST_LOCALE_NO_LIB | 81 -DBOOST_LOCALE_NO_LIB |
82 -DBOOST_HAS_LOCALE=1 | |
74 ) | 83 ) |
75 | 84 |
76 if (${CMAKE_COMPILER_IS_GNUCXX}) | 85 if (${CMAKE_COMPILER_IS_GNUCXX}) |
77 add_definitions(-isystem ${BOOST_SOURCES_DIR}) | 86 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
78 endif() | 87 endif() |
80 include_directories( | 89 include_directories( |
81 ${BOOST_SOURCES_DIR} | 90 ${BOOST_SOURCES_DIR} |
82 ) | 91 ) |
83 | 92 |
84 source_group(ThirdParty\\Boost REGULAR_EXPRESSION ${BOOST_SOURCES_DIR}/.*) | 93 source_group(ThirdParty\\Boost REGULAR_EXPRESSION ${BOOST_SOURCES_DIR}/.*) |
94 else() | |
95 add_definitions( | |
96 -DBOOST_HAS_LOCALE=0 | |
97 ) | |
85 endif() | 98 endif() |