Mercurial > hg > orthanc
comparison Resources/CMake/BoostConfiguration.cmake @ 2366:26f3a346226f
more consistent handling of libiconv in cmake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Aug 2017 21:21:48 +0200 |
parents | ae50eccd41b7 |
children | 2aff870c2c58 |
comparison
equal
deleted
inserted
replaced
2365:9e0eae8a5ea4 | 2366:26f3a346226f |
---|---|
63 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp | 63 ${BOOST_SOURCES_DIR}/libs/atomic/src/lockpool.cpp |
64 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp | 64 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp |
65 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp | 65 ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp |
66 ) | 66 ) |
67 add_definitions( | 67 add_definitions( |
68 -DBOOST_LOCALE_WITH_ICONV=1 | |
69 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 | 68 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 |
70 -DBOOST_LOCALE_NO_STD_BACKEND=1 | 69 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
71 ) | 70 ) |
72 | 71 |
73 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR | 72 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
75 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR | 74 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR |
76 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64") | 75 ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64") |
77 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) | 76 add_definitions(-DBOOST_HAS_SCHED_YIELD=1) |
78 endif() | 77 endif() |
79 | 78 |
80 link_libraries(iconv) | |
81 | |
82 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 79 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
83 list(APPEND BOOST_SOURCES | 80 list(APPEND BOOST_SOURCES |
84 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp | 81 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp |
85 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp | 82 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp |
86 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp | 83 ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp |
87 ${BOOST_FILESYSTEM_SOURCES_DIR}/windows_file_codecvt.cpp | 84 ${BOOST_FILESYSTEM_SOURCES_DIR}/windows_file_codecvt.cpp |
88 ) | 85 ) |
89 | |
90 # Starting with release 0.8.2, Orthanc statically links against | |
91 # libiconv, even on Windows. Indeed, the "WCONV" library of | |
92 # Windows XP seems not to support properly several codepages | |
93 # (notably "Latin3", "Hebrew", and "Arabic"). | |
94 | |
95 if (USE_BOOST_ICONV) | |
96 include(${ORTHANC_ROOT}/Resources/CMake/LibIconvConfiguration.cmake) | |
97 else() | |
98 add_definitions(-DBOOST_LOCALE_WITH_WCONV=1) | |
99 endif() | |
100 | 86 |
101 add_definitions( | 87 add_definitions( |
102 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 | 88 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 |
103 -DBOOST_LOCALE_NO_STD_BACKEND=1 | 89 -DBOOST_LOCALE_NO_STD_BACKEND=1 |
104 ) | 90 ) |