Mercurial > hg > orthanc
annotate Resources/CMake/BoostConfiguration.cmake @ 2551:caa4d350d60d
back to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Apr 2018 14:55:34 +0200 |
parents | a6c2d8a2a2ec |
children | ee9a6cd63891 |
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 |
2525 | 56 set(BOOST_NAME boost_1_66_0) |
57 set(BOOST_BCP_SUFFIX bcpdigest-1.3.2) | |
2527
a6c2d8a2a2ec
remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2525
diff
changeset
|
58 set(BOOST_MD5 "e509e66140e8f2fd4d326b0052825f52") |
2384 | 59 set(BOOST_URL "http://www.orthanc-server.com/downloads/third-party/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") |
735 | 60 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
|
61 |
2455
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
62 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}") |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
63 set(FirstRun OFF) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
64 else() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
65 set(FirstRun ON) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
66 endif() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
67 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
68 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
735 | 69 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
70 |
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 ## Generic configuration of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
73 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
74 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
75 if (CMAKE_COMPILER_IS_GNUCXX) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
76 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
77 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
78 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
79 include_directories( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
80 ${BOOST_SOURCES_DIR} |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
81 ) |
927 | 82 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
83 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
84 # Static build of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
85 -DBOOST_ALL_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
86 -DBOOST_ALL_NOLIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
87 -DBOOST_DATE_TIME_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
88 -DBOOST_THREAD_BUILD_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
89 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
90 -DBOOST_REGEX_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
91 -DBOOST_SYSTEM_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
92 -DBOOST_LOCALE_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
93 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
94 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
95 set(BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
96 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
97 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
98 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
99 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
2525 | 100 add_definitions( |
101 -DBOOST_SYSTEM_USE_STRERROR=1 | |
102 ) | |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
103 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
104 execute_process( |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
105 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
2525 | 106 ${ORTHANC_ROOT}/Resources/Patches/boost-1.66.0-linux-standard-base.patch |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
107 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
108 RESULT_VARIABLE Failure |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
109 ) |
2369 | 110 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
111 if (FirstRun AND Failure) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
112 message(FATAL_ERROR "Error while patching a file") |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
113 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
114 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
115 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
116 |
2369 | 117 ## |
118 ## Configuration of boost::thread | |
119 ## | |
120 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
121 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
122 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
123 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
124 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
125 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
126 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
127 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
128 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 129 list(APPEND BOOST_SOURCES |
2063 | 130 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp |
735 | 131 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
132 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | |
133 ) | |
134 | |
2057 | 135 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
136 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
137 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
138 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 139 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
140 endif() | |
141 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
142 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
735 | 143 list(APPEND BOOST_SOURCES |
144 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | |
145 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | |
146 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | |
147 ) | |
1094
1b905ad6c913
Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
930
diff
changeset
|
148 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
149 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
2515
7c8a246e8652
fix WebAssembly build
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2513
diff
changeset
|
150 # No support for threads in WebAssembly |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
151 |
735 | 152 else() |
153 message(FATAL_ERROR "Support your platform here") | |
154 endif() | |
155 | |
927 | 156 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
157 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
158 ## Configuration of boost::regex |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
159 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
160 |
735 | 161 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES) |
162 | |
163 list(APPEND BOOST_SOURCES | |
164 ${BOOST_REGEX_SOURCES} | |
165 ) | |
166 | |
2367
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 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
169 ## Configuration of boost::datetime |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
170 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
171 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
172 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
173 ${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
|
174 ) |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
175 |
2367
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 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
178 ## Configuration of boost::filesystem |
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 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
181 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
182 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
183 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
2063 | 184 # boost::filesystem is not available on PNaCl |
185 add_definitions( | |
186 -DBOOST_HAS_FILESYSTEM_V3=0 | |
187 -D__INTEGRITY=1 | |
188 ) | |
189 else() | |
2143
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
190 add_definitions( |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
191 -DBOOST_HAS_FILESYSTEM_V3=1 |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
192 ) |
2063 | 193 list(APPEND BOOST_SOURCES |
2369 | 194 ${BOOST_NAME}/libs/filesystem/src/codecvt_error_category.cpp |
195 ${BOOST_NAME}/libs/filesystem/src/operations.cpp | |
196 ${BOOST_NAME}/libs/filesystem/src/path.cpp | |
197 ${BOOST_NAME}/libs/filesystem/src/path_traits.cpp | |
2063 | 198 ) |
2368 | 199 |
2369 | 200 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2374 | 201 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
202 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
2369 | 203 list(APPEND BOOST_SOURCES |
204 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp | |
205 ) | |
206 | |
207 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
2368 | 208 list(APPEND BOOST_SOURCES |
2369 | 209 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp |
2368 | 210 ) |
211 endif() | |
2063 | 212 endif() |
213 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
214 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
215 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
216 ## Configuration of boost::locale |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
217 ## |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
218 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
219 if (NOT ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
220 message("boost::locale is disabled") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
221 else() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
222 list(APPEND BOOST_SOURCES |
2369 | 223 ${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
|
224 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
225 ${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
|
226 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
227 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/ids.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
228 ${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
|
229 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/message.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
230 ${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
|
231 ${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
|
232 ${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
|
233 ${BOOST_SOURCES_DIR}/libs/locale/src/util/gregorian.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
234 ${BOOST_SOURCES_DIR}/libs/locale/src/util/info.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
235 ${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
|
236 ) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
237 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
238 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
239 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase") |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
240 list(APPEND BOOST_SOURCES |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
241 ${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
|
242 ${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
|
243 ${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
|
244 ${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
|
245 ${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
|
246 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
247 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
248 add_definitions( |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
249 -DBOOST_LOCALE_WITH_ICONV=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
250 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
251 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
252 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
253 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
254 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
255 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
256 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
257 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
258 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
259 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2513
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
260 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
261 CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # For WebAssembly or asm.js |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
262 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
263 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
264 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
265 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
266 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
267 ${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
|
268 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
269 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
270 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
271 -DBOOST_LOCALE_WITH_ICONV=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
272 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
273 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
274 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
275 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
276 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
277 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
278 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
279 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
280 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/lcid.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
281 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
282 ${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
|
283 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
284 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
285 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
286 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
287 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
288 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
289 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
290 # Starting with release 0.8.2, Orthanc statically links against |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
291 # libiconv, even on Windows. Indeed, the "WCONV" library of |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
292 # Windows XP seems not to support properly several codepages |
2369 | 293 # (notably "Latin3", "Hebrew", and "Arabic"). Set |
294 # "USE_BOOST_ICONV" to "OFF" to use WCONV anyway. | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
295 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
296 if (USE_BOOST_ICONV) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
297 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
298 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
299 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
300 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
301 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
302 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
303 message(FATAL_ERROR "Support your platform here") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
304 endif() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
305 endif() |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
306 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
307 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
308 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
|
309 |
735 | 310 endif() |