annotate Resources/CMake/BoostConfiguration.cmake @ 2250:b5c8c0590f7f

fix in /changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Jan 2017 12:19:22 +0100
parents 4e8e0ad2001c
children 423d3b692bb9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
1 if (STATIC_BUILD OR NOT USE_SYSTEM_BOOST)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
2 set(BOOST_STATIC 1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
3 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
4 include(FindBoost)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
5
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
6 set(BOOST_STATIC 0)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
7 #set(Boost_DEBUG 1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
8 #set(Boost_USE_STATIC_LIBS ON)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
9
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
10 find_package(Boost
1932
2d46e378960d ORTHANC_BOOST_COMPONENTS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1931
diff changeset
11 COMPONENTS filesystem thread system date_time regex locale ${ORTHANC_BOOST_COMPONENTS})
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
12
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
13 if (NOT Boost_FOUND)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
14 message(FATAL_ERROR "Unable to locate Boost on this system")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
15 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
16
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
17 # 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
18 # http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
19 if (${Boost_VERSION} LESS 104400)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
20 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
21 -DBOOST_HAS_FILESYSTEM_V3=0
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
22 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
23 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
24 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
25 -DBOOST_HAS_FILESYSTEM_V3=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
26 -DBOOST_FILESYSTEM_VERSION=3
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
27 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
28 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
29
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
30 #if (${Boost_VERSION} LESS 104800)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
31 # boost::locale is only available from 1.48.00
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
32 #message("Too old version of Boost (${Boost_LIB_VERSION}): Building the static version")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
33 # set(BOOST_STATIC 1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
34 #endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
35
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
36 include_directories(${Boost_INCLUDE_DIRS})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
37 link_libraries(${Boost_LIBRARIES})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
38 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
39
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
40
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
41 if (BOOST_STATIC)
1931
687ff92d173b Upgrade to Boost 1.60.0 for static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1830
diff changeset
42 # Parameters for Boost 1.60.0
687ff92d173b Upgrade to Boost 1.60.0 for static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1830
diff changeset
43 set(BOOST_NAME boost_1_60_0)
687ff92d173b Upgrade to Boost 1.60.0 for static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1830
diff changeset
44 set(BOOST_BCP_SUFFIX bcpdigest-1.0.1)
1991
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1932
diff changeset
45 set(BOOST_MD5 "a789f8ec2056ad1c2d5f0cb64687cc7b")
2186
8b51b133bb8b move of third party downloads to the main server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2143
diff changeset
46 set(BOOST_URL "http://www.orthanc-server.com/downloads/third-party/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1473
diff changeset
47 set(BOOST_FILESYSTEM_SOURCES_DIR "${BOOST_NAME}/libs/filesystem/src")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
48 set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1473
diff changeset
49
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1473
diff changeset
50 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
51
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
52 set(BOOST_SOURCES)
927
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
53
890
816dccaeb7cf Support of kFreeBSD
jodogne
parents: 753
diff changeset
54 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
930
27d256e0b458 integration mainline -> mac
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 928 915
diff changeset
55 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
1337
afaa55d42ddd FreeBSD support
jodogne
parents: 1323
diff changeset
56 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
2057
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2018
diff changeset
57 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
2065
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
58 ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
59 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
60 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
61 list(APPEND BOOST_SOURCES
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
62 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
63 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
64 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
65 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
66 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
67 -DBOOST_LOCALE_WITH_ICONV=1
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
68 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
69 -DBOOST_LOCALE_NO_STD_BACKEND=1
735
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
2057
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2018
diff changeset
72 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR
2065
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
73 ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
74 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
75 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
76 add_definitions(-DBOOST_HAS_SCHED_YIELD=1)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
77 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
78
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
79 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
80 list(APPEND BOOST_SOURCES
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
81 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
82 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
83 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
84 ${BOOST_FILESYSTEM_SOURCES_DIR}/windows_file_codecvt.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
85 )
1094
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
86
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
87 # Starting with release 0.8.2, Orthanc statically links against
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
88 # libiconv, even on Windows. Indeed, the "WCONV" library of
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
89 # Windows XP seems not to support properly several codepages
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
90 # (notably "Latin3", "Hebrew", and "Arabic").
1b905ad6c913 Replace wconv by iconv under Windows
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 930
diff changeset
91
1323
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1097
diff changeset
92 if (USE_BOOST_ICONV)
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1097
diff changeset
93 include(${ORTHANC_ROOT}/Resources/CMake/LibIconvConfiguration.cmake)
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1097
diff changeset
94 else()
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1097
diff changeset
95 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1)
5a92665dee23 Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1097
diff changeset
96 endif()
927
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
97
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
98 add_definitions(
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
99 -DBOOST_LOCALE_NO_POSIX_BACKEND=1
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
100 -DBOOST_LOCALE_NO_STD_BACKEND=1
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
101 )
2242
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
102
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
103 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
104 add_definitions(
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
105 -DBOOST_LOCALE_NO_POSIX_BACKEND=1
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
106 -DBOOST_LOCALE_NO_STD_BACKEND=1
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
107 )
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
108
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
109 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
110 message(FATAL_ERROR "Support your platform here")
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
111 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
112
927
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
113 if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
114 list(APPEND BOOST_SOURCES
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
115 ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
116 )
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
117 endif()
ff1812962f30 fix DOS EOL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 921
diff changeset
118
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
119 aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES)
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
120
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
121 list(APPEND BOOST_SOURCES
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
122 ${BOOST_REGEX_SOURCES}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
123 ${BOOST_SOURCES_DIR}/libs/date_time/src/gregorian/greg_month.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
124 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
125 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
126
2242
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
127 if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
128 list(APPEND BOOST_SOURCES
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
129 ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
130 )
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
131 endif()
4e8e0ad2001c move USleep() in SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2186
diff changeset
132
2065
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
133 if (${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
134 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
135 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
136 # boost::filesystem is not available on PNaCl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
137 add_definitions(
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
138 -DBOOST_HAS_FILESYSTEM_V3=0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
139 -D__INTEGRITY=1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
140 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
141 else()
2143
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
142 add_definitions(
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
143 -DBOOST_HAS_FILESYSTEM_V3=1
fd5875662670 creation of namespace SystemToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2113
diff changeset
144 )
2063
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
145 list(APPEND BOOST_SOURCES
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
146 ${BOOST_FILESYSTEM_SOURCES_DIR}/codecvt_error_category.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
147 ${BOOST_FILESYSTEM_SOURCES_DIR}/operations.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
148 ${BOOST_FILESYSTEM_SOURCES_DIR}/path.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
149 ${BOOST_FILESYSTEM_SOURCES_DIR}/path_traits.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
150 )
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
151 endif()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2057
diff changeset
152
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
153 if (USE_BOOST_LOCALE_BACKENDS)
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
154 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
155 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
156 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
2057
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2018
diff changeset
157 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
2065
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
158 ${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
159 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2063
diff changeset
160 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
2018
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
161 list(APPEND BOOST_SOURCES
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
162 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/codecvt.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
163 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/collate.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
164 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/converter.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
165 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/numeric.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
166 ${BOOST_SOURCES_DIR}/libs/locale/src/posix/posix_backend.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
167 )
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
168 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
169 list(APPEND BOOST_SOURCES
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
170 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
171 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/converter.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
172 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/lcid.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
173 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/numeric.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
174 ${BOOST_SOURCES_DIR}/libs/locale/src/win32/win_backend.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
175 )
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
176 else()
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
177 message(FATAL_ERROR "Support your platform here")
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
178 endif()
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
179
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
180 list(APPEND BOOST_SOURCES
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
181 ${BOOST_REGEX_SOURCES}
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
182 ${BOOST_SOURCES_DIR}/libs/date_time/src/gregorian/greg_month.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
183 ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
184
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
185 ${BOOST_FILESYSTEM_SOURCES_DIR}/codecvt_error_category.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
186 ${BOOST_FILESYSTEM_SOURCES_DIR}/operations.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
187 ${BOOST_FILESYSTEM_SOURCES_DIR}/path.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
188 ${BOOST_FILESYSTEM_SOURCES_DIR}/path_traits.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
189
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
190 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
191 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/date_time.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
192 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
193 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/ids.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
194 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/localization_backend.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
195 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/message.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
196 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/mo_lambda.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
197 ${BOOST_SOURCES_DIR}/libs/locale/src/util/codecvt_converter.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
198 ${BOOST_SOURCES_DIR}/libs/locale/src/util/default_locale.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
199 ${BOOST_SOURCES_DIR}/libs/locale/src/util/gregorian.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
200 ${BOOST_SOURCES_DIR}/libs/locale/src/util/info.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
201 ${BOOST_SOURCES_DIR}/libs/locale/src/util/locale_data.cpp
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
202 )
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
203 endif()
300599489cab USE_BOOST_LOCALE_BACKENDS
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1991
diff changeset
204
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
205 add_definitions(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
206 # Static build of Boost
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
207 -DBOOST_ALL_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
208 -DBOOST_ALL_NOLIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
209 -DBOOST_DATE_TIME_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
210 -DBOOST_THREAD_BUILD_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
211 -DBOOST_PROGRAM_OPTIONS_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
212 -DBOOST_REGEX_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
213 -DBOOST_SYSTEM_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
214 -DBOOST_LOCALE_NO_LIB
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
215 -DBOOST_HAS_LOCALE=1
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
216 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
217
1415
728c22ade2e2 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1414
diff changeset
218 if (CMAKE_COMPILER_IS_GNUCXX)
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
219 add_definitions(-isystem ${BOOST_SOURCES_DIR})
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
220 endif()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
221
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
222 include_directories(
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
223 ${BOOST_SOURCES_DIR}
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
224 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
225
2113
0108ac01fc8e added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2065
diff changeset
226 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
227
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
228 else()
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
229 add_definitions(
915
703bef350e89 Orthanc now relies entirely on boost::locale
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 890
diff changeset
230 -DBOOST_HAS_LOCALE=1
735
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
231 )
ee0d5abf7958 dos2unix
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 626
diff changeset
232 endif()
1397
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
233
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
234
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
235 add_definitions(
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
236 -DBOOST_HAS_DATE_TIME=1
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
237 -DBOOST_HAS_REGEX=1
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
238 )