annotate OrthancFramework/Resources/CMake/BoostConfiguration.cmake @ 5079:4366b4c41441

back to mainline
author Alain Mazy <am@osimis.io>
date Wed, 31 Aug 2022 10:36:38 +0200
parents 956a9fed0aa8
children 0ea402b4d901
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4870
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
43e613a7756b upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
6 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
7 # 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
8 # 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
9 # 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
10 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
11 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
12 # 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
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
14 # 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
15 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
16 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
17 # 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
18 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
19 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
20
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
21
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
22 if (STATIC_BUILD OR NOT USE_SYSTEM_BOOST)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
23 set(BOOST_STATIC 1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
24 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
25 include(FindBoost)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
26
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
27 set(BOOST_STATIC 0)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
28 #set(Boost_DEBUG 1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
29 #set(Boost_USE_STATIC_LIBS ON)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
30
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
31 if (ENABLE_LOCALE)
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
32 list(APPEND ORTHANC_BOOST_COMPONENTS locale)
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
33 endif()
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
34
4185
b289a1234822 giving a try to cross-platform compilation of SyncStorageArea
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
35 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
36 find_package(Boost COMPONENTS ${ORTHANC_BOOST_COMPONENTS})
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
37
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
38 if (NOT Boost_FOUND)
2469
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
39 foreach (item ${ORTHANC_BOOST_COMPONENTS})
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
40 string(TOUPPER ${item} tmp)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
41
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
42 if (Boost_${tmp}_FOUND)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
43 set(tmp2 "found")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
44 else()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
45 set(tmp2 "missing")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
46 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
47
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
48 message("Boost component ${item} - ${tmp2}")
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
49 endforeach()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2468
diff changeset
50
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
51 message(FATAL_ERROR "Unable to locate Boost on this system")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
52 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
53
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
54
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 # 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
56 # broken with newer boost/cmake)
4476
c1f36fd13730 migrate remaining links to issues in bitbucket to mercurial server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
57 # https://bugs.orthanc-server.com/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
58 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
59 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
60 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
61 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
62 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
63
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
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
65 # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
66 # 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
67 if (${Boost_VERSION} LESS ${BOOST144})
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
68 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
69 -DBOOST_HAS_FILESYSTEM_V3=0
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
70 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
71 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
72 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
73 -DBOOST_HAS_FILESYSTEM_V3=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
74 -DBOOST_FILESYSTEM_VERSION=3
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
75 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
76 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
77
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
78 include_directories(${Boost_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
79 link_libraries(${Boost_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
80 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
81
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
82
5063
cfbf45e76468 added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4870
diff changeset
83 if (BOOST_STATIC AND USE_LEGACY_BOOST)
5065
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5064
diff changeset
84 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
85 endif()
cfbf45e76468 added CMake option USE_LEGACY_BOOST
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4870
diff changeset
86
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 if (BOOST_STATIC AND NOT USE_LEGACY_BOOST)
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
89 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
90 ## Parameters for static compilation of Boost
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
91 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
92
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
93 set(BOOST_NAME boost_1_80_0)
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
94 set(BOOST_VERSION 1.80.0)
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
95 set(BOOST_BCP_SUFFIX bcpdigest-1.11.2)
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
96 set(BOOST_MD5 "7734e19f9a39a4411b807a9913e4a5ff")
3133
0c2a8d5e0097 moving third-party dependencies to another server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2988
diff changeset
97 set(BOOST_URL "http://orthanc.osimis.io/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
98 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
99
2455
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
100 if (IS_DIRECTORY "${BOOST_SOURCES_DIR}")
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
101 set(FirstRun OFF)
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
102 else()
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
103 set(FirstRun ON)
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
104 endif()
6b3c0d5f65af improved e2fsprogs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2454
diff changeset
105
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1473
diff changeset
106 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
107
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
108
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 ## Generic configuration of Boost
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
111 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
112
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
113 if (CMAKE_COMPILER_IS_GNUCXX)
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
114 add_definitions(-isystem ${BOOST_SOURCES_DIR})
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
115 endif()
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
116
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
117 include_directories(
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
118 BEFORE
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
119 ${BOOST_SOURCES_DIR}
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
120 ${BOOST_SOURCES_DIR}/libs/atomic/src/
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
121 ${BOOST_SOURCES_DIR}/libs/locale/src/
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
122 )
927
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
123
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
124 if (ORTHANC_BUILDING_FRAMEWORK_LIBRARY)
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
125 add_definitions(
4535
c40c1234a696 simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4476
diff changeset
126 # Packaging Boost inside the Orthanc Framework DLL
c40c1234a696 simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4476
diff changeset
127 -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
128 -DBOOST_THREAD_BUILD_DLL
4307
2a9d304b3a82 fix build of Orthanc framework DLL for Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4186
diff changeset
129 -DBOOST_REGEX_BUILD_DLL
4535
c40c1234a696 simplification of DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4476
diff changeset
130 -DBOOST_IOSTREAMS_SOURCE
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
131 )
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
132 else()
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
133 add_definitions(
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
134 # 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
135 # Orthanc <= 1.7.1)
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
136 -DBOOST_ALL_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
137 -DBOOST_ALL_NOLIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
138 -DBOOST_DATE_TIME_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
139 -DBOOST_THREAD_BUILD_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
140 -DBOOST_PROGRAM_OPTIONS_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
141 -DBOOST_REGEX_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
142 -DBOOST_SYSTEM_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
143 -DBOOST_LOCALE_NO_LIB
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
144 )
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
145 endif()
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3750
diff changeset
146
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
147 add_definitions(
3579
74fc2a3b43bb -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3347
diff changeset
148 # 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
149 # 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
150 # "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
151 # "," 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
152 # "OrthancStone::LinearAlgebra::ParseVector()".
74fc2a3b43bb -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3347
diff changeset
153 -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
154
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
155 # 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
156 # https://github.com/RGLab/cytolib/issues/49
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
157 -DBOOST_NO_AUTO_PTR
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
158 -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
159 -DBOOST_FILESYSTEM_HAS_POSIX_AT_APIS
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
160 )
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 set(BOOST_SOURCES
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
163 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
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
2781
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
166 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
167 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
2525
94423976888e boost 1.66.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2515
diff changeset
168 add_definitions(
94423976888e boost 1.66.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2515
diff changeset
169 -DBOOST_SYSTEM_USE_STRERROR=1
94423976888e boost 1.66.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2515
diff changeset
170 )
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
171 endif()
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
172
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
173
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
174 ##
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
175 ## Configuration of boost::thread
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
176 ##
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
177
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
178 if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
179 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
180 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
181 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
182 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
183 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
184 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR
2782
64e3d4ab158d find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2781
diff changeset
185 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR
64e3d4ab158d find sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2781
diff changeset
186 CMAKE_SYSTEM_NAME STREQUAL "Android")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
187 list(APPEND BOOST_SOURCES
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
188 ${BOOST_SOURCES_DIR}/libs/atomic/src/lock_pool.cpp
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
189 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
190 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
191 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
192
2057
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2018
diff changeset
193 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
194 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
195 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
196 CMAKE_SYSTEM_NAME STREQUAL "NaCl64")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
197 add_definitions(-DBOOST_HAS_SCHED_YIELD=1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
198 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
199
3347
ab17e8e94776 fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3313
diff changeset
200 # 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
201 # 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
202 # 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
203 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
ab17e8e94776 fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3313
diff changeset
204 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
205 endif()
ab17e8e94776 fix build of Stone on OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3313
diff changeset
206
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
207 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
208 list(APPEND BOOST_SOURCES
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
209 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
210 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
211 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
212 )
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
213
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
214 elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
2781
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
215 # No support for threads in asm.js/WebAssembly
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
216
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
217 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
218 message(FATAL_ERROR "Support your platform here")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
219 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
220
927
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
221
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
222 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
223 ## Configuration of boost::regex
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
224 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
225
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
226 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
227
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
228 list(APPEND BOOST_SOURCES
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
229 ${BOOST_REGEX_SOURCES}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
230 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
231
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
232
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
233 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
234 ## Configuration of boost::datetime
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
235 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
236
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
237 list(APPEND BOOST_SOURCES
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
238 ${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
239 )
2242
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
240
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
241
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
242 ##
4186
e99d1ad11cfe fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4185
diff changeset
243 ## Configuration of boost::filesystem and boost::iostreams
2367
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
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
246 if (CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
247 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR
2781
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
248 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR
13038d638097 primitives for android ndk
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
249 CMAKE_SYSTEM_NAME STREQUAL "Android")
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
250 # boost::filesystem is not available on PNaCl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
251 add_definitions(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
252 -DBOOST_HAS_FILESYSTEM_V3=0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
253 -D__INTEGRITY=1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
254 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
255 else()
2143
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
256 add_definitions(
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
257 -DBOOST_HAS_FILESYSTEM_V3=1
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
258 )
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
259 list(APPEND BOOST_SOURCES
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
260 ${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
261 ${BOOST_NAME}/libs/filesystem/src/directory.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
262 ${BOOST_NAME}/libs/filesystem/src/exception.cpp
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
263 ${BOOST_NAME}/libs/filesystem/src/operations.cpp
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
264 ${BOOST_NAME}/libs/filesystem/src/path.cpp
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
265 ${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
266 ${BOOST_NAME}/libs/filesystem/src/portability.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
267 ${BOOST_NAME}/libs/filesystem/src/unique_path.cpp
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
268 )
2368
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2367
diff changeset
269
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
270 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
2374
7087141c74b9 fix for FreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2371
diff changeset
271 CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
7087141c74b9 fix for FreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2371
diff changeset
272 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
273 list(APPEND BOOST_SOURCES
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
274 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
275 )
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
276
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
277 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
2368
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2367
diff changeset
278 list(APPEND BOOST_SOURCES
2369
61371420f383 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2368
diff changeset
279 ${BOOST_NAME}/libs/filesystem/src/windows_file_codecvt.cpp
2368
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2367
diff changeset
280 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2367
diff changeset
281 endif()
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
282 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
283
4186
e99d1ad11cfe fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4185
diff changeset
284 list(APPEND BOOST_SOURCES
e99d1ad11cfe fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4185
diff changeset
285 ${BOOST_NAME}/libs/iostreams/src/file_descriptor.cpp
e99d1ad11cfe fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4185
diff changeset
286 )
e99d1ad11cfe fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4185
diff changeset
287
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
288
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
289 ##
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
290 ## Configuration of boost::locale
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
291 ##
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
292
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
293 if (NOT ENABLE_LOCALE)
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
294 message("boost::locale is disabled")
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
295 else()
3230
4b042ec734c1 dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3228
diff changeset
296 set(BOOST_ICU_SOURCES
5066
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
297 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/boundary.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
298 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/codecvt.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
299 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/collator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
300 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/conversion.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
301 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/date_time.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
302 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/formatter.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
303 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/icu_backend.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
304 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/icu/numeric.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5065
diff changeset
305 ${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
306 )
4b042ec734c1 dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3228
diff changeset
307
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
308 list(APPEND BOOST_SOURCES
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
309 ${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
310 ${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
311 ${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
312 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/shared/generator.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
313 ${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
314 ${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
315 ${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
316 ${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
317 ${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
318 ${BOOST_SOURCES_DIR}/libs/locale/src/boost/locale/util/default_locale.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
319 ${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
320 ${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
321 ${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
322 )
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
323
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
324 if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
325 CMAKE_SYSTEM_VERSION STREQUAL "LinuxStandardBase")
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
326 add_definitions(
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
327 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
328 -DBOOST_LOCALE_NO_POSIX_BACKEND=1
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
329 )
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
330
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
331 list(APPEND BOOST_SOURCES
5064
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/std/codecvt.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/std/collate.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
334 ${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
335 ${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
336 ${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
337 )
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
338
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
339 if (BOOST_LOCALE_BACKEND STREQUAL "gcc" OR
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
340 BOOST_LOCALE_BACKEND STREQUAL "libiconv")
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
341 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1)
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
342 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu")
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
343 add_definitions(-DBOOST_LOCALE_WITH_ICU=1)
3230
4b042ec734c1 dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3228
diff changeset
344 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES})
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
345 else()
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
346 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
347 endif()
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
348
2448
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
349 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
350 CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
351 CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
352 CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
353 CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR
862d943115f9 working on linux standard base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
354 CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR
2513
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
355 CMAKE_SYSTEM_NAME STREQUAL "NaCl64" OR
97a74f0eac7a loading DICOM dictionaries in sandboxed environments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2512
diff changeset
356 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
357 add_definitions(
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
358 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
359 -DBOOST_LOCALE_NO_STD_BACKEND=1
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
360 )
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
361
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
362 list(APPEND BOOST_SOURCES
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
363 ${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
364 ${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
365 ${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
366 ${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
367 ${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
368 )
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
369
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
370 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
371 BOOST_LOCALE_BACKEND STREQUAL "gcc" OR
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
372 BOOST_LOCALE_BACKEND STREQUAL "libiconv")
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
373 # 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
374 # that is shipped with the stdlib
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
375 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1)
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
376 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu")
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
377 add_definitions(-DBOOST_LOCALE_WITH_ICU=1)
3230
4b042ec734c1 dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3228
diff changeset
378 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES})
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
379 else()
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
380 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
381 endif()
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
382
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
383 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
384 add_definitions(
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
385 -DBOOST_LOCALE_NO_POSIX_BACKEND=1
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
386 -DBOOST_LOCALE_NO_STD_BACKEND=1
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
387 )
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
388
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
389 list(APPEND BOOST_SOURCES
5064
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/win32/collate.cpp
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5063
diff changeset
391 ${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
392 ${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
393 ${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
394 ${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
395 )
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
396
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
397 # 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
398 # 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
399 # 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
400 # "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
401 # to "wconv" to use WCONV anyway.
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
402
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
403 if (BOOST_LOCALE_BACKEND STREQUAL "libiconv")
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
404 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1)
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
405 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu")
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
406 add_definitions(-DBOOST_LOCALE_WITH_ICU=1)
3230
4b042ec734c1 dynamic linking against libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3228
diff changeset
407 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES})
3228
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
408 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv")
4b9cfd92d1ae preparing for libicu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3133
diff changeset
409 message("Using Window's wconv")
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
410 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1)
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
411 else()
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3230
diff changeset
412 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
413 endif()
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
414
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
415 else()
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
416 message(FATAL_ERROR "Support your platform here")
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
417 endif()
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
418 endif()
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
419
2367
2aff870c2c58 refactoring of BoostConfiguration.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2366
diff changeset
420
2113
0108ac01fc8e added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2065
diff changeset
421 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
422
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
423 endif()