Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CMake/BoostConfiguration.cmake @ 5749:3cee66f96e2e find-refactoring tip
fix
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 02 Sep 2024 17:21:38 +0200 |
parents | f7adfb22e20e |
children |
rev | line source |
---|---|
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
1 # Orthanc - A Lightweight, RESTful DICOM Store |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
3 # Department, University Hospital of Liege, Belgium |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5628
diff
changeset
|
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5628
diff
changeset
|
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5434
diff
changeset
|
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4120
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
7 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
8 # This program is free software: you can redistribute it and/or |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
9 # modify it under the terms of the GNU Lesser General Public License |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
10 # as published by the Free Software Foundation, either version 3 of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
11 # the License, or (at your option) any later version. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
12 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
13 # This program is distributed in the hope that it will be useful, but |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
14 # WITHOUT ANY WARRANTY; without even the implied warranty of |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
16 # Lesser General Public License for more details. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
17 # |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
18 # You should have received a copy of the GNU Lesser General Public |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
19 # License along with this program. If not, see |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
20 # <http://www.gnu.org/licenses/>. |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
21 |
304842a0d152
adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
22 |
735 | 23 if (STATIC_BUILD OR NOT USE_SYSTEM_BOOST) |
24 set(BOOST_STATIC 1) | |
25 else() | |
26 include(FindBoost) | |
27 | |
28 set(BOOST_STATIC 0) | |
29 #set(Boost_DEBUG 1) | |
30 #set(Boost_USE_STATIC_LIBS ON) | |
31 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
32 if (ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
33 list(APPEND ORTHANC_BOOST_COMPONENTS locale) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
34 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
35 |
4185
b289a1234822
giving a try to cross-platform compilation of SyncStorageArea
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4120
diff
changeset
|
36 list(APPEND ORTHANC_BOOST_COMPONENTS filesystem thread system date_time regex iostreams) |
3750
0ba17d2bcdc9
fix for boost 1.71 - cf. Debian Bug#953884
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3653
diff
changeset
|
37 find_package(Boost COMPONENTS ${ORTHANC_BOOST_COMPONENTS}) |
735 | 38 |
39 if (NOT Boost_FOUND) | |
2469 | 40 foreach (item ${ORTHANC_BOOST_COMPONENTS}) |
41 string(TOUPPER ${item} tmp) | |
42 | |
43 if (Boost_${tmp}_FOUND) | |
44 set(tmp2 "found") | |
45 else() | |
46 set(tmp2 "missing") | |
47 endif() | |
48 | |
49 message("Boost component ${item} - ${tmp2}") | |
50 endforeach() | |
51 | |
735 | 52 message(FATAL_ERROR "Unable to locate Boost on this system") |
53 endif() | |
54 | |
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
|
55 |
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
|
56 # 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
|
57 # broken with newer boost/cmake) |
5432
59e3b6f8c5be
migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5398
diff
changeset
|
58 # https://orthanc.uclouvain.be/bugs/show_bug.cgi?id=166 |
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
|
59 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
|
60 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
|
61 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
|
62 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
|
63 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
|
64 |
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
|
65 |
735 | 66 # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem |
67 # 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
|
68 if (${Boost_VERSION} LESS ${BOOST144}) |
735 | 69 add_definitions( |
70 -DBOOST_HAS_FILESYSTEM_V3=0 | |
71 ) | |
72 else() | |
73 add_definitions( | |
74 -DBOOST_HAS_FILESYSTEM_V3=1 | |
75 -DBOOST_FILESYSTEM_VERSION=3 | |
76 ) | |
77 endif() | |
78 | |
79 include_directories(${Boost_INCLUDE_DIRS}) | |
80 link_libraries(${Boost_LIBRARIES}) | |
81 endif() | |
82 | |
83 | |
5063
cfbf45e76468
added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
84 if (BOOST_STATIC AND USE_LEGACY_BOOST) |
5065 | 85 include(${CMAKE_CURRENT_LIST_DIR}/BoostConfigurationStatic-1.69.0.cmake) |
5063
cfbf45e76468
added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
86 endif() |
cfbf45e76468
added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
87 |
cfbf45e76468
added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
88 |
cfbf45e76468
added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4870
diff
changeset
|
89 if (BOOST_STATIC AND NOT USE_LEGACY_BOOST) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
90 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
91 ## Parameters for static compilation of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
92 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
93 |
5628
6045c696e86b
upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5544
diff
changeset
|
94 set(BOOST_NAME boost_1_85_0) |
6045c696e86b
upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5544
diff
changeset
|
95 set(BOOST_VERSION 1.85.0) |
6045c696e86b
upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5544
diff
changeset
|
96 set(BOOST_BCP_SUFFIX bcpdigest-1.12.4) |
6045c696e86b
upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5544
diff
changeset
|
97 set(BOOST_MD5 "1017e9c8383efdea01c059a8d3cc4dda") |
5434
aa1c09fa6632
changed location of third-party downloads
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5432
diff
changeset
|
98 set(BOOST_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") |
735 | 99 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
|
100 |
2455
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
101 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}") |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
102 set(FirstRun OFF) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
103 else() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
104 set(FirstRun ON) |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
105 endif() |
6b3c0d5f65af
improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2454
diff
changeset
|
106 |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1473
diff
changeset
|
107 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
735 | 108 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
109 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
110 ## |
5398
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
111 ## Apply the patches to remove threads from boost::locale (required |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
112 ## since around Emscripten 3.x) |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
113 ## |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
114 |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
115 if (FirstRun) |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
116 execute_process( |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
117 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
5628
6045c696e86b
upgraded to boost 1.85.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5544
diff
changeset
|
118 ${CMAKE_CURRENT_LIST_DIR}/../Patches/boost-1.85.0-emscripten.patch |
5398
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
119 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
120 RESULT_VARIABLE Failure |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
121 ) |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
122 |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
123 if (Failure) |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
124 message(FATAL_ERROR "Error while patching a file") |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
125 endif() |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
126 endif() |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
127 |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
128 |
08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5397
diff
changeset
|
129 ## |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
130 ## Generic configuration of Boost |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
131 ## |
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 if (CMAKE_COMPILER_IS_GNUCXX) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
134 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
135 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
136 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
137 include_directories( |
5512 | 138 BEFORE |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
139 ${BOOST_SOURCES_DIR} |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
140 ${BOOST_SOURCES_DIR}/libs/atomic/src/ |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
141 ${BOOST_SOURCES_DIR}/libs/locale/src/ |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
142 ) |
927 | 143 |
4026
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
144 if (ORTHANC_BUILDING_FRAMEWORK_LIBRARY) |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
145 add_definitions( |
4535
c40c1234a696
simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4476
diff
changeset
|
146 # Packaging Boost inside the Orthanc Framework DLL |
c40c1234a696
simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4476
diff
changeset
|
147 -DBOOST_ALL_DYN_LINK # Expose Boost symbols into the DLL |
4026
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
148 -DBOOST_THREAD_BUILD_DLL |
4307
2a9d304b3a82
fix build of Orthanc framework DLL for Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4186
diff
changeset
|
149 -DBOOST_REGEX_BUILD_DLL |
4535
c40c1234a696
simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4476
diff
changeset
|
150 -DBOOST_IOSTREAMS_SOURCE |
4026
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
151 ) |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
152 else() |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
153 add_definitions( |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
154 # Static build of Boost (this was the only possibility in |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
155 # Orthanc <= 1.7.1) |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
156 -DBOOST_ALL_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
157 -DBOOST_ALL_NOLIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
158 -DBOOST_DATE_TIME_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
159 -DBOOST_THREAD_BUILD_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
160 -DBOOST_PROGRAM_OPTIONS_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
161 -DBOOST_REGEX_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
162 -DBOOST_SYSTEM_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
163 -DBOOST_LOCALE_NO_LIB |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
164 ) |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
165 endif() |
05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3750
diff
changeset
|
166 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
167 add_definitions( |
3579
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
168 # 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
|
169 # 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
|
170 # "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
|
171 # "," 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
|
172 # "OrthancStone::LinearAlgebra::ParseVector()". |
74fc2a3b43bb
-DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3347
diff
changeset
|
173 -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
174 |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
175 # Those definitions are necessary since Boost 1.80.0 |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
176 # https://github.com/RGLab/cytolib/issues/49 |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
177 -DBOOST_NO_AUTO_PTR |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
178 -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
179 -DBOOST_FILESYSTEM_HAS_POSIX_AT_APIS |
2367
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 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
182 set(BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
183 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
184 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
185 |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
186 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
187 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") |
2525 | 188 add_definitions( |
189 -DBOOST_SYSTEM_USE_STRERROR=1 | |
190 ) | |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
191 endif() |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
192 |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
193 |
2369 | 194 ## |
195 ## Configuration of boost::thread | |
196 ## | |
197 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
198 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
199 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
200 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
201 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
202 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
203 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
204 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2782
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
205 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
64e3d4ab158d
find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2781
diff
changeset
|
206 CMAKE_SYSTEM_NAME STREQUAL "Android") |
735 | 207 list(APPEND BOOST_SOURCES |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
208 ${BOOST_SOURCES_DIR}/libs/atomic/src/lock_pool.cpp |
735 | 209 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
210 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | |
211 ) | |
212 | |
2057 | 213 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
214 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 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
216 CMAKE_SYSTEM_NAME STREQUAL "NaCl64") |
735 | 217 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
218 endif() | |
219 | |
3347
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
220 # 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
|
221 # 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
|
222 # 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
|
223 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
224 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
|
225 endif() |
ab17e8e94776
fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3313
diff
changeset
|
226 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
227 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
735 | 228 list(APPEND BOOST_SOURCES |
229 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | |
230 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | |
231 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | |
232 ) | |
1094
1b905ad6c913
Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
930
diff
changeset
|
233 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
234 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
235 # No support for threads in asm.js/WebAssembly |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
236 |
735 | 237 else() |
238 message(FATAL_ERROR "Support your platform here") | |
239 endif() | |
240 | |
927 | 241 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
242 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
243 ## Configuration of boost::regex |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
244 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
245 |
735 | 246 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES) |
247 | |
248 list(APPEND BOOST_SOURCES | |
249 ${BOOST_REGEX_SOURCES} | |
250 ) | |
251 | |
2367
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 ## Configuration of boost::datetime |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
255 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
256 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
257 list(APPEND BOOST_SOURCES |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
258 ${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
|
259 ) |
2242
4e8e0ad2001c
move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2186
diff
changeset
|
260 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
261 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
262 ## |
4186 | 263 ## Configuration of boost::filesystem and boost::iostreams |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
264 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
265 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
266 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
267 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2781
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
268 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
13038d638097
primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2679
diff
changeset
|
269 CMAKE_SYSTEM_NAME STREQUAL "Android") |
2063 | 270 # boost::filesystem is not available on PNaCl |
271 add_definitions( | |
272 -DBOOST_HAS_FILESYSTEM_V3=0 | |
273 -D__INTEGRITY=1 | |
274 ) | |
275 else() | |
2143
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
276 add_definitions( |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
277 -DBOOST_HAS_FILESYSTEM_V3=1 |
fd5875662670
creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2113
diff
changeset
|
278 ) |
2063 | 279 list(APPEND BOOST_SOURCES |
2369 | 280 ${BOOST_NAME}/libs/filesystem/src/codecvt_error_category.cpp |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
281 ${BOOST_NAME}/libs/filesystem/src/directory.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
282 ${BOOST_NAME}/libs/filesystem/src/exception.cpp |
2369 | 283 ${BOOST_NAME}/libs/filesystem/src/operations.cpp |
284 ${BOOST_NAME}/libs/filesystem/src/path.cpp | |
285 ${BOOST_NAME}/libs/filesystem/src/path_traits.cpp | |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
286 ${BOOST_NAME}/libs/filesystem/src/portability.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
287 ${BOOST_NAME}/libs/filesystem/src/unique_path.cpp |
2063 | 288 ) |
2368 | 289 |
2369 | 290 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
2374 | 291 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
292 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") | |
2369 | 293 list(APPEND BOOST_SOURCES |
294 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp | |
295 ) | |
296 | |
297 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | |
2368 | 298 list(APPEND BOOST_SOURCES |
2369 | 299 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp |
2368 | 300 ) |
301 endif() | |
2063 | 302 endif() |
303 | |
4186 | 304 list(APPEND BOOST_SOURCES |
305 ${BOOST_NAME}/libs/iostreams/src/file_descriptor.cpp | |
306 ) | |
307 | |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
308 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
309 ## |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
310 ## Configuration of boost::locale |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
311 ## |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
312 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
313 if (NOT ENABLE_LOCALE) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
314 message("boost::locale is disabled") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
315 else() |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
316 set(BOOST_ICU_SOURCES |
5066 | 317 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/boundary.cpp |
318 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/codecvt.cpp | |
319 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/collator.cpp | |
320 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/conversion.cpp | |
321 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/date_time.cpp | |
322 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/formatter.cpp | |
5544
dce22a789a2b
Multitenant DICOM plugin: added support for locales
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5512
diff
changeset
|
323 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/formatters_cache.cpp |
5066 | 324 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/icu_backend.cpp |
325 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/numeric.cpp | |
326 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/time_zone.cpp | |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
327 ) |
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
328 |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
329 list(APPEND BOOST_SOURCES |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
330 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/encoding/codepage.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
331 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/date_time.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
332 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/formatting.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
333 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/generator.cpp |
5288
dc8fe64a452f
upgrade to boost 1.82.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5271
diff
changeset
|
334 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/iconv_codecvt.cpp |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
335 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/ids.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
336 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/localization_backend.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
337 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/message.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
338 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/mo_lambda.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
339 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/codecvt_converter.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
340 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/default_locale.cpp |
5288
dc8fe64a452f
upgrade to boost 1.82.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5271
diff
changeset
|
341 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/encoding.cpp |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
342 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/gregorian.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
343 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/info.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
344 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/locale_data.cpp |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
345 ) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
346 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
347 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
348 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
349 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
350 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
351 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
352 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
353 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
354 list(APPEND BOOST_SOURCES |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
355 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/std/codecvt.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
356 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/std/collate.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
357 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/std/converter.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
358 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/std/numeric.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
359 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/std/std_backend.cpp |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
360 ) |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
361 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
362 if (BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
363 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
364 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
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 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
369 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
|
370 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
371 |
2448
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
372 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
373 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
374 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
375 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
376 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR |
862d943115f9
working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2432
diff
changeset
|
377 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR |
2513
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
378 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR |
97a74f0eac7a
loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2512
diff
changeset
|
379 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
|
380 add_definitions( |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
381 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
382 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
383 ) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
384 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
385 list(APPEND BOOST_SOURCES |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
386 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/posix/codecvt.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
387 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/posix/collate.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
388 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/posix/converter.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
389 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/posix/numeric.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
390 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/posix/posix_backend.cpp |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
391 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
392 |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
393 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
|
394 BOOST_LOCALE_BACKEND STREQUAL "gcc" OR |
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
395 BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
396 # 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
|
397 # that is shipped with the stdlib |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
398 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
399 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
400 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
401 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
402 else() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
403 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
|
404 endif() |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
405 |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
406 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
407 add_definitions( |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
408 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
409 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
410 ) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
411 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
412 list(APPEND BOOST_SOURCES |
5064
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
413 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/win32/collate.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
414 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/win32/converter.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
415 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/win32/lcid.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
416 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/win32/numeric.cpp |
6156a970a2e1
upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5063
diff
changeset
|
417 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/win32/win_backend.cpp |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
418 ) |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
419 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
420 # 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
|
421 # 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
|
422 # 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
|
423 # "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
|
424 # to "wconv" to use WCONV anyway. |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
425 |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
426 if (BOOST_LOCALE_BACKEND STREQUAL "libiconv") |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
427 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
428 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
429 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
3230
4b042ec734c1
dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3228
diff
changeset
|
430 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
3228
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
431 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv") |
4b9cfd92d1ae
preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
432 message("Using Window's wconv") |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
433 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
434 else() |
3241
32596919d729
first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3230
diff
changeset
|
435 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
|
436 endif() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
437 |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
438 else() |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
439 message(FATAL_ERROR "Support your platform here") |
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
440 endif() |
2018
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
441 endif() |
300599489cab
USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1991
diff
changeset
|
442 |
2367
2aff870c2c58
refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2366
diff
changeset
|
443 |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2065
diff
changeset
|
444 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
|
445 |
735 | 446 endif() |