diff options
-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> |