diff options
author | 2014-10-26 20:47:34 -0700 | |
---|---|---|
committer | 2014-10-26 20:47:34 -0700 | |
commit | 78b187921c9bdd3278098847d37fb807110bacf7 (patch) | |
tree | 2839d83b8c9e60518d899171c8c2ee63e54e5234 | |
parent | a11686316c2da049246d7697be8b335e52dd1ced (diff) |
Use ICU on Linux
-rw-r--r-- | src/CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/core/basetypes/MCString.cc | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2e1db1bb..51b047d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,6 +69,27 @@ else() message(STATUS "Found uchardet") endif() +if(NOT APPLE) + + # detect icu + + find_path(ICU4C_INCLUDE_DIR + NAMES unicode/utf8.h + PATHS ${additional_includes} + ) + find_library(ICU_LIBRARY + NAMES icuuc + PATHS ${additional_lib_searchpath} + ) + + if(NOT ICU4C_INCLUDE_DIR OR NOT ICU4C_LIBRARY) + message(FATAL_ERROR "ERROR: Could not find icu4c") + else() + message(STATUS "Found icu4c") + endif() + +endif() + # detect libetpan find_path(LIBETPAN_INCLUDE_DIR diff --git a/src/core/basetypes/MCString.cc b/src/core/basetypes/MCString.cc index 85c9c5d0..581bd245 100644 --- a/src/core/basetypes/MCString.cc +++ b/src/core/basetypes/MCString.cc @@ -1,6 +1,8 @@ #include "MCString.h" +#if __APPLE__ #define DISABLE_ICU 1 +#endif #include <string.h> #include <stdlib.h> |