diff --git a/libs/locale/src/CMakeLists.txt b/libs/locale/src/CMakeLists.txt
index e9b5e9b..c5ee05c 100644
a
|
b
|
if (ICU_FOUND AND ICU_I18N_FOUND) |
10 | 10 | set (BOOST_LOCALE_ICU_LIBRARIES ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES}) |
11 | 11 | colormsg (GREEN "+-- ICU (unicode) available for locale, enabling support.") |
12 | 12 | set (NO_STATIC_IF_ICU_FOUND "NO_STATIC") |
| 13 | set(LOCALE_ICU_SOURCES |
| 14 | icu/boundary.cpp |
| 15 | icu/codecvt.cpp |
| 16 | icu/collator.cpp |
| 17 | icu/conversion.cpp |
| 18 | icu/date_time.cpp |
| 19 | icu/formatter.cpp |
| 20 | icu/icu_backend.cpp |
| 21 | icu/numeric.cpp |
| 22 | icu/time_zone.cpp |
| 23 | ) |
13 | 24 | else (ICU_FOUND AND ICU_I18N_FOUND) |
14 | 25 | colormsg (CYAN "+-- ICU (unicode) not available for locale, disabling support.") |
| 26 | set(LOCALE_ICU_SOURCES) |
15 | 27 | endif (ICU_FOUND AND ICU_I18N_FOUND) |
16 | | |
| 28 | |
| 29 | set(LOCALE_POSIX_SOURCES) |
| 30 | set(LOCALE_WIN_SOURCES) |
| 31 | set(LOCALE_STD_SOURCES) |
| 32 | if(UNIX) |
| 33 | set(LOCALE_POSIX_SOURCES |
| 34 | posix/collate.cpp |
| 35 | posix/converter.cpp |
| 36 | posix/numeric.cpp |
| 37 | posix/codecvt.cpp |
| 38 | posix/posix_backend.cpp |
| 39 | ) |
| 40 | set(LOCALE_STD_SOURCES |
| 41 | std/codecvt.cpp |
| 42 | std/collate.cpp |
| 43 | std/converter.cpp |
| 44 | std/numeric.cpp |
| 45 | std/std_backend.cpp |
| 46 | ) |
| 47 | add_definitions(-DBOOST_LOCALE_NO_WINAPI_BACKEND=1) |
| 48 | colormsg (GREEN "+-- UNIX system: enabling posix and std locale backends.") |
| 49 | elseif(WIN32) |
| 50 | set(LOCALE_WIN_SOURCES |
| 51 | win32/collate.cpp |
| 52 | win32/converter.cpp |
| 53 | win32/lcid.cpp |
| 54 | win32/numeric.cpp |
| 55 | win32/win_backend.cpp |
| 56 | ) |
| 57 | add_definitions(-DBOOST_LOCALE_NO_POSIX_BACKEND=1) |
| 58 | add_definitions(-DBOOST_LOCALE_NO_STD_BACKEND=1) |
| 59 | colormsg (GREEN "+-- WIN32 system: enabling winapi locale backend.") |
| 60 | else() |
| 61 | message(FATAL_ERROR "Cannot decide which backend to enable!") |
| 62 | endif() |
17 | 63 | |
18 | 64 | add_definitions (-DBOOST_THREAD_NO_LIB=1) |
19 | 65 | boost_add_library ( |
… |
… |
boost_add_library ( |
29 | 75 | shared/mo_lambda.cpp |
30 | 76 | util/codecvt_converter.cpp |
31 | 77 | util/default_locale.cpp |
| 78 | util/gregorian.cpp |
32 | 79 | util/info.cpp |
33 | 80 | util/locale_data.cpp |
| 81 | ${LOCALE_ICU_SOURCES} |
| 82 | ${LOCALE_POSIX_SOURCES} |
| 83 | ${LOCALE_STD_SOURCES} |
| 84 | ${LOCALE_WIN_SOURCES} |
34 | 85 | |
35 | 86 | LINK_LIBS ${BOOST_LOCALE_ICU_LIBRARIES} |
36 | 87 | SHARED_COMPILE_FLAGS -DBOOST_LOCALE_DYN_LINK=1 |
37 | 88 | ${NO_STATIC_IF_ICU_FOUND} |
| 89 | DEPENDS boost_thread |
38 | 90 | ) |