diff options
author | Allen Winter <winter@kde.org> | 2022-01-16 11:43:01 -0500 |
---|---|---|
committer | Allen Winter <winter@kde.org> | 2022-01-16 11:43:01 -0500 |
commit | 5321c56b584aa39b39c449656dd31649a5824861 (patch) | |
tree | c6dfe8d085579888302b277cce38444ccbda48dc | |
parent | e4aea4dc7c23f58bfdf7fa00a7c32f8837236f5f (diff) | |
download | libical-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.txt | 6 |
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 |