Mercurial > hg > orthanc
annotate Resources/CMake/BoostConfiguration.cmake @ 3894:8f7ad4989fec transcoding
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 May 2020 11:13:29 +0200 |
parents | 0ba17d2bcdc9 |
children | 05a363186da6 |
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) |
3750
0ba17d2bcdc9
fix for boost 1.71 - cf. Debian Bug#953884
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3653
diff
changeset
|
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 | |
3653
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
33 |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
34 # Patch by xnox to fix issue #166 (CMake find_boost version is now |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
35 # broken with newer boost/cmake) |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
36 # https://bitbucket.org/sjodogne/orthanc/issues/166/ |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
37 if (POLICY CMP0093) |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
38 set(BOOST144 1.44) |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
39 else() |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
40 set(BOOST144 104400) |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
41 endif() |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
42 |
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
43 |
735 | 44 # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem |
45 # http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm | |
3653
468181e2f090
Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3579
diff
changeset
|
46 if (${Boost_VERSION} LESS ${BOOST144}) |
735 | 47 add_definitions( |
48 -DBOOST_HAS_FILESYSTEM_V3=0 | |
49 ) | |
50 else() | |
51 add_definitions( | |
52 -DBOOST_HAS_FILESYSTEM_V3=1 | |
53 -DBOOST_FILESYSTEM_VERSION=3 | |
54 ) | |
55 endif() | |
56 | |
57 include_directories(${Boost_INCLUDE_DIRS}) | |
58 link_libraries(${Boost_LIBRARIES}) | |
59 endif() | |
60 | |
61 | |
62 if (BOOST_STATIC) | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
63 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
64 ## Parameters for static compilation of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
65 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
66 |
3282
e8ce77f3dec1
upgrade to Boost 1.69.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3241
diff
changeset
|
67 set(BOOST_NAME boost_1_69_0) |
e8ce77f3dec1
upgrade to Boost 1.69.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3241
diff
changeset
|
68 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
|
69 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
|
70 set(BOOST_MD5 "579bccc0ea4d1a261c1d0c5e27446c3d") |
3133
0c2a8d5e0097
moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2988
diff
changeset
|
71 set(BOOST_URL "http://orthanc.osimis.io/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") |
735 | 72 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
|
73 |
2455
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
74 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}") |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
75 set(FirstRun OFF) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
76 else() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
77 set(FirstRun ON) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
78 endif() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
79 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
80 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
735 | 81 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
82 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
83 ## |
2878
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
84 ## Patching boost |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
85 ## |
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 execute_process( |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
88 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
89 ${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
|
90 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
91 RESULT_VARIABLE Failure |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
92 ) |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
93 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
94 if (FirstRun AND Failure) |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
95 message(FATAL_ERROR "Error while patching a file") |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
96 endif() |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
97 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
98 |
320a877a1f40
making the boost patch mandatory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2782
diff
changeset
|
99 ## |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
100 ## Generic configuration of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
101 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
102 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
103 if (CMAKE_COMPILER_IS_GNUCXX) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
104 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
105 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
106 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
107 include_directories( |
2912
ab03dae59d6e
place Boost include directories at highest priority
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2878
diff
changeset
|
108 BEFORE ${BOOST_SOURCES_DIR} |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
109 ) |
927 | 110 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
111 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
112 # Static build of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
113 -DBOOST_ALL_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
114 -DBOOST_ALL_NOLIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
115 -DBOOST_DATE_TIME_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
116 -DBOOST_THREAD_BUILD_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
117 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
118 -DBOOST_REGEX_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
119 -DBOOST_SYSTEM_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
120 -DBOOST_LOCALE_NO_LIB |
3579
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
121 |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
122 # In static builds, explicitly prevent Boost from using the system |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
123 # locale in lexical casts. This is notably important if |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
124 # "boost::lexical_cast<double>()" is applied to strings containing |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
125 # "," instead of "." as decimal separators. Check out function |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
126 # "OrthancStone::LinearAlgebra::ParseVector()". |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
127 -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
128 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
129 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
130 set(BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
131 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
132 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
133 |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
134 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
135 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") |
2525 | 136 add_definitions( |
137 -DBOOST_SYSTEM_USE_STRERROR=1 | |
138 ) | |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
139 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
140 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
141 |
2369 | 142 ## |
143 ## Configuration of boost::thread | |
144 ## | |
145 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
146 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
147 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
148 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
149 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
150 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
151 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
152 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2782
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
153 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
154 CMAKE_SYSTEM_NAME STREQUAL "Android") |
735 | 155 list(APPEND BOOST_SOURCES |
2063 | 156 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp |
735 | 157 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
158 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | |
159 ) | |
160 | |
2057 | 161 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
162 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
163 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
164 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 165 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
166 endif() | |
167 | |
3347
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
168 # Fix for error: "boost_1_69_0/boost/chrono/detail/inlined/mac/thread_clock.hpp:54:28: |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
169 # error: use of undeclared identifier 'pthread_mach_thread_np'" |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
170 # https://github.com/envoyproxy/envoy/pull/1785 |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
171 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
172 add_definitions(-D_DARWIN_C_SOURCE=1) |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
173 endif() |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
174 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
175 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
735 | 176 list(APPEND BOOST_SOURCES |
177 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | |
178 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | |
179 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | |
180 ) | |
1094
1b905ad6c913
Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
930
diff
changeset
|
181 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
182 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
183 # No support for threads in asm.js/WebAssembly |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
184 |
735 | 185 else() |
186 message(FATAL_ERROR "Support your platform here") | |
187 endif() | |
188 | |
927 | 189 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
190 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
191 ## Configuration of boost::regex |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
192 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
193 |
735 | 194 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES) |
195 | |
196 list(APPEND BOOST_SOURCES | |
197 ${BOOST_REGEX_SOURCES} | |
198 ) | |
199 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
200 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
201 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
202 ## Configuration of boost::datetime |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
203 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
204 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
205 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
206 ${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
|
207 ) |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
208 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
209 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
210 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
211 ## Configuration of boost::filesystem |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
212 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
213 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
214 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
215 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
216 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
217 CMAKE_SYSTEM_NAME STREQUAL "Android") |
2063 | 218 # boost::filesystem is not available on PNaCl |
219 add_definitions( | |
220 -DBOOST_HAS_FILESYSTEM_V3=0 | |
221 -D__INTEGRITY=1 | |
222 ) | |
223 else() | |
2143
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
224 add_definitions( |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
225 -DBOOST_HAS_FILESYSTEM_V3=1 |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
226 ) |
2063 | 227 list(APPEND BOOST_SOURCES |
2369 | 228 ${BOOST_NAME}/libs/filesystem/src/codecvt_error_category.cpp |
229 ${BOOST_NAME}/libs/filesystem/src/operations.cpp | |
230 ${BOOST_NAME}/libs/filesystem/src/path.cpp | |
231 ${BOOST_NAME}/libs/filesystem/src/path_traits.cpp | |
2063 | 232 ) |
2368 | 233 |
2369 | 234 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2374 | 235 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
236 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
2369 | 237 list(APPEND BOOST_SOURCES |
238 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp | |
239 ) | |
240 | |
241 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
2368 | 242 list(APPEND BOOST_SOURCES |
2369 | 243 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp |
2368 | 244 ) |
245 endif() | |
2063 | 246 endif() |
247 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
248 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
249 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
250 ## Configuration of boost::locale |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
251 ## |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
252 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
253 if (NOT ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
254 message("boost::locale is disabled") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
255 else() |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
256 set(BOOST_ICU_SOURCES |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
257 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/boundary.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
258 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/codecvt.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
259 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/collator.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
260 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/conversion.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
261 ${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
|
262 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/formatter.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
263 ${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
|
264 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/numeric.cpp |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
265 ${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
|
266 ) |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
267 |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
268 list(APPEND BOOST_SOURCES |
2369 | 269 ${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
|
270 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
271 ${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
|
272 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
273 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/ids.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
274 ${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
|
275 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/message.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
276 ${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
|
277 ${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
|
278 ${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
|
279 ${BOOST_SOURCES_DIR}/libs/locale/src/util/gregorian.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
280 ${BOOST_SOURCES_DIR}/libs/locale/src/util/info.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
281 ${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
|
282 ) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
283 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
284 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
285 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
286 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
287 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
288 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
289 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
290 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
291 list(APPEND BOOST_SOURCES |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
292 ${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
|
293 ${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
|
294 ${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
|
295 ${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
|
296 ${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
|
297 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
298 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
299 if (BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
300 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
301 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
302 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
303 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
304 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
305 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
306 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
|
307 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
308 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
309 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
310 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
311 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
312 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
313 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
314 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2513
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
315 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
316 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
|
317 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
318 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
319 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
320 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
321 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
322 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
323 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
324 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
325 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
326 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
327 ${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
|
328 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
329 |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
330 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
|
331 BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
332 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
333 # 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
|
334 # that is shipped with the stdlib |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
335 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
336 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
337 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
338 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
339 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
340 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
|
341 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
342 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
343 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
344 add_definitions( |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
345 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
346 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
347 ) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
348 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
349 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
350 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
351 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
352 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/lcid.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
353 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
354 ${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
|
355 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
356 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
357 # 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
|
358 # 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
|
359 # 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
|
360 # "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
|
361 # to "wconv" to use WCONV anyway. |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
362 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
363 if (BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
364 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
365 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
366 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
367 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
368 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
369 message("Using Window's wconv") |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
370 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
371 else() |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
372 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
|
373 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
374 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
375 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
376 message(FATAL_ERROR "Support your platform here") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
377 endif() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
378 endif() |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
379 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
380 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
381 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
|
382 |
735 | 383 endif() |