Mercurial > hg > orthanc
annotate Resources/CMake/BoostConfiguration.cmake @ 3783:c1a180539fee TomasZubiri/minor-typo-in-comments-1553026669603
closing pull request
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Mar 2020 09:36:41 +0100 |
parents | 3e0ad879eba2 |
children | ab17e8e94776 |
rev | line source |
---|---|
735 | 1 if (STATIC_BUILD OR NOT USE_SYSTEM_BOOST) |
2 set(BOOST_STATIC 1) | |
3 else() | |
4 include(FindBoost) | |
5 | |
6 set(BOOST_STATIC 0) | |
7 #set(Boost_DEBUG 1) | |
8 #set(Boost_USE_STATIC_LIBS ON) | |
9 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
10 if (ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
11 list(APPEND ORTHANC_BOOST_COMPONENTS locale) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
12 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
13 |
2468 | 14 list(APPEND ORTHANC_BOOST_COMPONENTS filesystem thread system date_time regex) |
2469 | 15 find_package(Boost COMPONENTS "${ORTHANC_BOOST_COMPONENTS}") |
735 | 16 |
17 if (NOT Boost_FOUND) | |
2469 | 18 foreach (item ${ORTHANC_BOOST_COMPONENTS}) |
19 string(TOUPPER ${item} tmp) | |
20 | |
21 if (Boost_${tmp}_FOUND) | |
22 set(tmp2 "found") | |
23 else() | |
24 set(tmp2 "missing") | |
25 endif() | |
26 | |
27 message("Boost component ${item} - ${tmp2}") | |
28 endforeach() | |
29 | |
735 | 30 message(FATAL_ERROR "Unable to locate Boost on this system") |
31 endif() | |
32 | |
33 # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem | |
34 # http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm | |
35 if (${Boost_VERSION} LESS 104400) | |
36 add_definitions( | |
37 -DBOOST_HAS_FILESYSTEM_V3=0 | |
38 ) | |
39 else() | |
40 add_definitions( | |
41 -DBOOST_HAS_FILESYSTEM_V3=1 | |
42 -DBOOST_FILESYSTEM_VERSION=3 | |
43 ) | |
44 endif() | |
45 | |
46 include_directories(${Boost_INCLUDE_DIRS}) | |
47 link_libraries(${Boost_LIBRARIES}) | |
48 endif() | |
49 | |
50 | |
51 if (BOOST_STATIC) | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
52 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
53 ## Parameters for static compilation of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
54 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
55 |
3282
e8ce77f3dec1
upgrade to Boost 1.69.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3241
diff
changeset
|
56 set(BOOST_NAME boost_1_69_0) |
e8ce77f3dec1
upgrade to Boost 1.69.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3241
diff
changeset
|
57 set(BOOST_VERSION 1.69.0) |
3313
3e0ad879eba2
added chrono library in Boost for Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3282
diff
changeset
|
58 set(BOOST_BCP_SUFFIX bcpdigest-1.5.6) |
3e0ad879eba2
added chrono library in Boost for Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3282
diff
changeset
|
59 set(BOOST_MD5 "579bccc0ea4d1a261c1d0c5e27446c3d") |
3133
0c2a8d5e0097
moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2988
diff
changeset
|
60 set(BOOST_URL "http://orthanc.osimis.io/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") |
735 | 61 set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME}) |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
62 |
2455
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
63 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}") |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
64 set(FirstRun OFF) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
65 else() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
66 set(FirstRun ON) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
67 endif() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
68 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
69 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
735 | 70 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
71 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
72 ## |
2878
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
73 ## Patching boost |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
74 ## |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
75 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
76 execute_process( |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
77 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
78 ${ORTHANC_ROOT}/Resources/Patches/boost-${BOOST_VERSION}-linux-standard-base.patch |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
79 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
80 RESULT_VARIABLE Failure |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
81 ) |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
82 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
83 if (FirstRun AND Failure) |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
84 message(FATAL_ERROR "Error while patching a file") |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
85 endif() |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
86 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
87 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
88 ## |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
89 ## Generic configuration of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
90 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
91 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
92 if (CMAKE_COMPILER_IS_GNUCXX) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
93 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
94 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
95 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
96 include_directories( |
2912
ab03dae59d6e
place Boost include directories at highest priority
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2878
diff
changeset
|
97 BEFORE ${BOOST_SOURCES_DIR} |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
98 ) |
927 | 99 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
100 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
101 # Static build of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
102 -DBOOST_ALL_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
103 -DBOOST_ALL_NOLIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
104 -DBOOST_DATE_TIME_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
105 -DBOOST_THREAD_BUILD_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
106 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
107 -DBOOST_REGEX_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
108 -DBOOST_SYSTEM_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
109 -DBOOST_LOCALE_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
110 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
111 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
112 set(BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
113 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
114 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
115 |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
116 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
117 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") |
2525 | 118 add_definitions( |
119 -DBOOST_SYSTEM_USE_STRERROR=1 | |
120 ) | |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
121 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
122 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
123 |
2369 | 124 ## |
125 ## Configuration of boost::thread | |
126 ## | |
127 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
128 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
129 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
130 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
131 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
132 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
133 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
134 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2782
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
135 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
136 CMAKE_SYSTEM_NAME STREQUAL "Android") |
735 | 137 list(APPEND BOOST_SOURCES |
2063 | 138 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp |
735 | 139 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
140 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | |
141 ) | |
142 | |
2057 | 143 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
144 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
145 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
146 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 147 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
148 endif() | |
149 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
150 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
735 | 151 list(APPEND BOOST_SOURCES |
152 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | |
153 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | |
154 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | |
155 ) | |
1094
1b905ad6c913
Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
930
diff
changeset
|
156 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
157 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
158 # No support for threads in asm.js/WebAssembly |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
159 |
735 | 160 else() |
161 message(FATAL_ERROR "Support your platform here") | |
162 endif() | |
163 | |
927 | 164 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
165 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
166 ## Configuration of boost::regex |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
167 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
168 |
735 | 169 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES) |
170 | |
171 list(APPEND BOOST_SOURCES | |
172 ${BOOST_REGEX_SOURCES} | |
173 ) | |
174 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
175 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
176 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
177 ## Configuration of boost::datetime |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
178 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
179 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
180 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
181 ${BOOST_SOURCES_DIR}/libs/date_time/src/gregorian/greg_month.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
182 ) |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
183 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
184 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
185 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
186 ## Configuration of boost::filesystem |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
187 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
188 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
189 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
190 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
191 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
192 CMAKE_SYSTEM_NAME STREQUAL "Android") |
2063 | 193 # boost::filesystem is not available on PNaCl |
194 add_definitions( | |
195 -DBOOST_HAS_FILESYSTEM_V3=0 | |
196 -D__INTEGRITY=1 | |
197 ) | |
198 else() | |
2143
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
199 add_definitions( |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
200 -DBOOST_HAS_FILESYSTEM_V3=1 |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
201 ) |
2063 | 202 list(APPEND BOOST_SOURCES |
2369 | 203 ${BOOST_NAME}/libs/filesystem/src/codecvt_error_category.cpp |
204 ${BOOST_NAME}/libs/filesystem/src/operations.cpp | |
205 ${BOOST_NAME}/libs/filesystem/src/path.cpp | |
206 ${BOOST_NAME}/libs/filesystem/src/path_traits.cpp | |
2063 | 207 ) |
2368 | 208 |
2369 | 209 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2374 | 210 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
211 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
2369 | 212 list(APPEND BOOST_SOURCES |
213 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp | |
214 ) | |
215 | |
216 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
2368 | 217 list(APPEND BOOST_SOURCES |
2369 | 218 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp |
2368 | 219 ) |
220 endif() | |
2063 | 221 endif() |
222 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
223 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
224 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
225 ## Configuration of boost::locale |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
226 ## |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
227 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
228 if (NOT ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
229 message("boost::locale is disabled") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
230 else() |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
231 set(BOOST_ICU_SOURCES |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
232 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/boundary.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
233 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/codecvt.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
234 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/collator.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
235 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/conversion.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
236 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/date_time.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
237 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/formatter.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
238 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/icu_backend.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
239 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/numeric.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
240 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/time_zone.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
241 ) |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
242 |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
243 list(APPEND BOOST_SOURCES |
2369 | 244 ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
245 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
246 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/date_time.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
247 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
248 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/ids.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
249 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/localization_backend.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
250 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/message.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
251 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/mo_lambda.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
252 ${BOOST_SOURCES_DIR}/libs/locale/src/util/codecvt_converter.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
253 ${BOOST_SOURCES_DIR}/libs/locale/src/util/default_locale.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
254 ${BOOST_SOURCES_DIR}/libs/locale/src/util/gregorian.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
255 ${BOOST_SOURCES_DIR}/libs/locale/src/util/info.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
256 ${BOOST_SOURCES_DIR}/libs/locale/src/util/locale_data.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
257 ) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
258 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
259 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
260 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
261 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
262 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
263 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
264 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
265 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
266 list(APPEND BOOST_SOURCES |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
267 ${BOOST_SOURCES_DIR}/libs/locale/src/std/codecvt.cpp |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
268 ${BOOST_SOURCES_DIR}/libs/locale/src/std/collate.cpp |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
269 ${BOOST_SOURCES_DIR}/libs/locale/src/std/converter.cpp |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
270 ${BOOST_SOURCES_DIR}/libs/locale/src/std/numeric.cpp |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
271 ${BOOST_SOURCES_DIR}/libs/locale/src/std/std_backend.cpp |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
272 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
273 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
274 if (BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
275 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
276 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
277 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
278 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
279 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
280 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
281 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
282 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
283 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
284 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
285 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
286 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
287 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
288 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
289 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2513
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
290 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
291 CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # For WebAssembly or asm.js |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
292 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
293 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
294 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
295 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
296 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
297 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
298 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
299 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
300 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
301 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
302 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/posix_backend.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
303 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
304 |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
305 if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
306 BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
307 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
308 # In WebAssembly or asm.js, we rely on the version of iconv |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
309 # that is shipped with the stdlib |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
310 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
311 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
312 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
313 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
314 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
315 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
316 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
317 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
318 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
319 add_definitions( |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
320 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
321 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
322 ) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
323 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
324 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
325 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
326 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
327 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/lcid.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
328 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
329 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/win_backend.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
330 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
331 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
332 # Starting with release 0.8.2, Orthanc statically links against |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
333 # libiconv on Windows. Indeed, the "WCONV" library of Windows XP |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
334 # seems not to support properly several codepages (notably |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
335 # "Latin3", "Hebrew", and "Arabic"). Set "BOOST_LOCALE_BACKEND" |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
336 # to "wconv" to use WCONV anyway. |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
337 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
338 if (BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
339 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
340 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
341 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
342 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
343 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
344 message("Using Window's wconv") |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
345 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
346 else() |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
347 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND on Windows: ${BOOST_LOCALE_BACKEND}") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
348 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
349 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
350 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
351 message(FATAL_ERROR "Support your platform here") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
352 endif() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
353 endif() |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
354 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
355 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
356 source_group(ThirdParty\\boost REGULAR_EXPRESSION ${BOOST_SOURCES_DIR}/.*) |
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
357 |
735 | 358 endif() |