Mercurial > hg > orthanc
comparison Resources/CMake/BoostConfiguration.cmake @ 3230:4b042ec734c1
dynamic linking against libicu
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Feb 2019 20:22:33 +0100 |
parents | 4b9cfd92d1ae |
children | 32596919d729 |
comparison
equal
deleted
inserted
replaced
3229:77e8378f0323 | 3230:4b042ec734c1 |
---|---|
226 ## | 226 ## |
227 | 227 |
228 if (NOT ENABLE_LOCALE) | 228 if (NOT ENABLE_LOCALE) |
229 message("boost::locale is disabled") | 229 message("boost::locale is disabled") |
230 else() | 230 else() |
231 set(BOOST_ICU_SOURCES | |
232 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/boundary.cpp | |
233 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/codecvt.cpp | |
234 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/collator.cpp | |
235 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/conversion.cpp | |
236 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/date_time.cpp | |
237 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/formatter.cpp | |
238 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/icu_backend.cpp | |
239 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/numeric.cpp | |
240 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/time_zone.cpp | |
241 ) | |
242 | |
231 list(APPEND BOOST_SOURCES | 243 list(APPEND BOOST_SOURCES |
232 ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp | 244 ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp |
233 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp | 245 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/generator.cpp |
234 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/date_time.cpp | 246 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/date_time.cpp |
235 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp | 247 ${BOOST_SOURCES_DIR}/libs/locale/src/shared/formatting.cpp |
261 | 273 |
262 if (BOOST_LOCALE_BACKEND STREQUAL "iconv") | 274 if (BOOST_LOCALE_BACKEND STREQUAL "iconv") |
263 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) | 275 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
264 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") | 276 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
265 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) | 277 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
278 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) | |
266 else() | 279 else() |
267 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") | 280 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") |
268 endif() | 281 endif() |
269 | 282 |
270 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR | 283 elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR |
293 # In WebAssembly or asm.js, we rely on the version of iconv | 306 # In WebAssembly or asm.js, we rely on the version of iconv |
294 # that is shipped with the stdlib | 307 # that is shipped with the stdlib |
295 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) | 308 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
296 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") | 309 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
297 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) | 310 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
298 list(APPEND BOOST_SOURCES | 311 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) |
299 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/boundary.cpp | |
300 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/codecvt.cpp | |
301 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/collator.cpp | |
302 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/conversion.cpp | |
303 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/date_time.cpp | |
304 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/formatter.cpp | |
305 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/icu_backend.cpp | |
306 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/numeric.cpp | |
307 ${BOOST_SOURCES_DIR}/libs/locale/src/icu/time_zone.cpp | |
308 ) | |
309 else() | 312 else() |
310 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") | 313 message(FATAL_ERROR "Unsupported value for BOOST_LOCALE_BACKEND: ${BOOST_LOCALE_BACKEND}") |
311 endif() | 314 endif() |
312 | 315 |
313 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") | 316 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
332 | 335 |
333 if (BOOST_LOCALE_BACKEND STREQUAL "iconv") | 336 if (BOOST_LOCALE_BACKEND STREQUAL "iconv") |
334 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) | 337 add_definitions(-DBOOST_LOCALE_WITH_ICONV=1) |
335 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") | 338 elseif (BOOST_LOCALE_BACKEND STREQUAL "icu") |
336 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) | 339 add_definitions(-DBOOST_LOCALE_WITH_ICU=1) |
340 list(APPEND BOOST_SOURCES ${BOOST_ICU_SOURCES}) | |
337 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv") | 341 elseif (BOOST_LOCALE_BACKEND STREQUAL "wconv") |
338 message("Using Window's wconv") | 342 message("Using Window's wconv") |
339 else() | 343 else() |
340 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) | 344 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) |
341 endif() | 345 endif() |