summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <winter@kde.org>2022-01-16 11:43:01 -0500
committerAllen Winter <winter@kde.org>2022-01-16 11:43:01 -0500
commit5321c56b584aa39b39c449656dd31649a5824861 (patch)
treec6dfe8d085579888302b277cce38444ccbda48dc
parente4aea4dc7c23f58bfdf7fa00a7c32f8837236f5f (diff)
downloadlibical-git-5321c56b584aa39b39c449656dd31649a5824861.tar.gz
CMakeLists.txt - Mac provided ICU doesn't have development files
The MacOS provided ICU doesn't provide a developer SDK. Therefore we set a default ICU_ROOT to look in the homebrew. ICU_ROOT can be overridden by user to look elsewhere.
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f9df2be..bad4fcdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -199,6 +199,12 @@ endif()
if(NOT "$ENV{ICU_BASE}" STREQUAL "") #support the old ICU_BASE env
set(ICU_ROOT $ENV{ICU_BASE})
endif()
+if(NOT "$ENV{ICU_ROOT}")
+ #Use the homebrew version. MacOS provided ICU doesn't provide development files
+ if(APPLE)
+ set(ICU_ROOT "/usr/local/opt/icu4c") #look for the homebrew version first
+ endif()
+endif()
find_package(ICU COMPONENTS uc i18n)
set_package_properties(ICU PROPERTIES
TYPE RECOMMENDED