Mercurial > hg > orthanc
annotate Resources/CMake/BoostConfiguration.cmake @ 2464:61fc5133e5d5
Fix for Osimis issue WVB-319: Some images are not loading in US_MF
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 05 Jan 2018 16:38:25 +0100 |
parents | 6b3c0d5f65af |
children | 372678030ada |
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 |
735 | 14 find_package(Boost |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
15 COMPONENTS filesystem thread system date_time regex ${ORTHANC_BOOST_COMPONENTS}) |
735 | 16 |
17 if (NOT Boost_FOUND) | |
18 message(FATAL_ERROR "Unable to locate Boost on this system") | |
19 endif() | |
20 | |
21 # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem | |
22 # http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm | |
23 if (${Boost_VERSION} LESS 104400) | |
24 add_definitions( | |
25 -DBOOST_HAS_FILESYSTEM_V3=0 | |
26 ) | |
27 else() | |
28 add_definitions( | |
29 -DBOOST_HAS_FILESYSTEM_V3=1 | |
30 -DBOOST_FILESYSTEM_VERSION=3 | |
31 ) | |
32 endif() | |
33 | |
34 include_directories(${Boost_INCLUDE_DIRS}) | |
35 link_libraries(${Boost_LIBRARIES}) | |
36 endif() | |
37 | |
38 | |
39 if (BOOST_STATIC) | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
40 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
41 ## Parameters for static compilation of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
42 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
43 |
2432
5a650eef0794
Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
44 set(BOOST_NAME boost_1_65_1) |
5a650eef0794
Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
45 set(BOOST_BCP_SUFFIX bcpdigest-1.3.1) |
5a650eef0794
Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2384
diff
changeset
|
46 set(BOOST_MD5 "92c9c603e56bbd7a450a305f08747d90") |
2384 | 47 set(BOOST_URL "http://www.orthanc-server.com/downloads/third-party/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") |
735 | 48 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
|
49 |
2455
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
50 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}") |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
51 set(FirstRun OFF) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
52 else() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
53 set(FirstRun ON) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
54 endif() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
55 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
56 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
735 | 57 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
58 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
59 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
60 ## Generic configuration of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
61 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
62 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
63 if (CMAKE_COMPILER_IS_GNUCXX) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
64 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
65 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
66 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
67 include_directories( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
68 ${BOOST_SOURCES_DIR} |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
69 ) |
927 | 70 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
71 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
72 # Static build of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
73 -DBOOST_ALL_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
74 -DBOOST_ALL_NOLIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
75 -DBOOST_DATE_TIME_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
76 -DBOOST_THREAD_BUILD_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
77 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
78 -DBOOST_REGEX_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
79 -DBOOST_SYSTEM_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
80 -DBOOST_LOCALE_NO_LIB |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
81 ) |
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 set(BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
84 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
85 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
86 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
87 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
88 add_definitions(-DBOOST_SYSTEM_USE_STRERROR=1) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
89 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
90 execute_process( |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
91 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
2454 | 92 ${ORTHANC_ROOT}/Resources/Patches/boost-1.65.1-linux-standard-base.patch |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
93 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
94 RESULT_VARIABLE Failure |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
95 ) |
2369 | 96 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
97 if (FirstRun AND Failure) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
98 message(FATAL_ERROR "Error while patching a file") |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
99 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
100 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
101 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
102 |
2369 | 103 ## |
104 ## Configuration of boost::thread | |
105 ## | |
106 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
107 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
108 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
109 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
110 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
111 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
112 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
113 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
114 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 115 list(APPEND BOOST_SOURCES |
2063 | 116 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp |
735 | 117 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
118 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | |
119 ) | |
120 | |
2057 | 121 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
122 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
123 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
124 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 125 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
126 endif() | |
127 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
128 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
735 | 129 list(APPEND BOOST_SOURCES |
130 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | |
131 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | |
132 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | |
133 ) | |
1094
1b905ad6c913
Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
930
diff
changeset
|
134 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
135 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
136 |
735 | 137 else() |
138 message(FATAL_ERROR "Support your platform here") | |
139 endif() | |
140 | |
927 | 141 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
142 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
143 ## Configuration of boost::regex |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
144 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
145 |
735 | 146 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES) |
147 | |
148 list(APPEND BOOST_SOURCES | |
149 ${BOOST_REGEX_SOURCES} | |
150 ) | |
151 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
152 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
153 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
154 ## Configuration of boost::datetime |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
155 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
156 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
157 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
158 ${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
|
159 ) |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
160 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
161 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
162 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
163 ## Configuration of boost::filesystem |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
164 ## |
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 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
167 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
168 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
2063 | 169 # boost::filesystem is not available on PNaCl |
170 add_definitions( | |
171 -DBOOST_HAS_FILESYSTEM_V3=0 | |
172 -D__INTEGRITY=1 | |
173 ) | |
174 else() | |
2143
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
175 add_definitions( |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
176 -DBOOST_HAS_FILESYSTEM_V3=1 |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
177 ) |
2063 | 178 list(APPEND BOOST_SOURCES |
2369 | 179 ${BOOST_NAME}/libs/filesystem/src/codecvt_error_category.cpp |
180 ${BOOST_NAME}/libs/filesystem/src/operations.cpp | |
181 ${BOOST_NAME}/libs/filesystem/src/path.cpp | |
182 ${BOOST_NAME}/libs/filesystem/src/path_traits.cpp | |
2063 | 183 ) |
2368 | 184 |
2369 | 185 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2374 | 186 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
187 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
2369 | 188 list(APPEND BOOST_SOURCES |
189 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp | |
190 ) | |
191 | |
192 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
2368 | 193 list(APPEND BOOST_SOURCES |
2369 | 194 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp |
2368 | 195 ) |
196 endif() | |
2063 | 197 endif() |
198 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
199 |
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 ## Configuration of boost::locale |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
202 ## |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
203 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
204 if (NOT ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
205 message("boost::locale is disabled") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
206 else() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
207 list(APPEND BOOST_SOURCES |
2369 | 208 ${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
|
209 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
210 ${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
|
211 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
212 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/ids.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
213 ${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
|
214 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/message.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
215 ${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
|
216 ${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
|
217 ${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
|
218 ${BOOST_SOURCES_DIR}/libs/locale/src/util/gregorian.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
219 ${BOOST_SOURCES_DIR}/libs/locale/src/util/info.cpp |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
220 ${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
|
221 ) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
222 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
223 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
224 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase") |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
225 list(APPEND BOOST_SOURCES |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
226 ${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
|
227 ${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
|
228 ${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
|
229 ${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
|
230 ${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
|
231 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
232 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
233 add_definitions( |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
234 -DBOOST_LOCALE_WITH_ICONV=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
235 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
236 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
237 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
238 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
239 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
240 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
241 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
242 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
243 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
244 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
245 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
246 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
247 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
248 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
249 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
250 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
251 ${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
|
252 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
253 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
254 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
255 -DBOOST_LOCALE_WITH_ICONV=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
256 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
257 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
258 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
259 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
260 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
261 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
262 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
263 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/converter.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
264 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/lcid.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
265 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/numeric.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
266 ${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
|
267 ) |
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 add_definitions( |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
270 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
271 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
272 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
273 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
274 # 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
|
275 # libiconv, even on Windows. Indeed, the "WCONV" library of |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
276 # Windows XP seems not to support properly several codepages |
2369 | 277 # (notably "Latin3", "Hebrew", and "Arabic"). Set |
278 # "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
|
279 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
280 if (USE_BOOST_ICONV) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
281 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
282 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
283 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
284 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
285 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
286 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
287 message(FATAL_ERROR "Support your platform here") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
288 endif() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
289 endif() |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
290 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
291 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
292 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
|
293 |
735 | 294 endif() |