diff options
author | Allen Winter <allen.winter@kdab.com> | 2017-02-01 13:30:35 -0500 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2017-02-01 13:30:35 -0500 |
commit | 81692272ad9362737c82f57ba926eb125690b75c (patch) | |
tree | 8feb5249a8c44ed6c45b2fcd5b18ea8f4651a447 | |
parent | b81f57ba26638656d92710146fc7e97a891d5c3e (diff) | |
download | libical-git-81692272ad9362737c82f57ba926eb125690b75c.tar.gz |
FindICU.cmake - set ICU_BINARY_DIR, for the runtime binaries
-rw-r--r-- | cmake/modules/FindICU.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/modules/FindICU.cmake b/cmake/modules/FindICU.cmake index 5908dd59..afc9985d 100644 --- a/cmake/modules/FindICU.cmake +++ b/cmake/modules/FindICU.cmake @@ -2,6 +2,7 @@ # # ICU_FOUND - True if ICU found. # ICU_I18N_FOUND - True if ICU's internationalization library found. +# ICU_BINARY_DIR - Directory with the runtime binaries # ICU_INCLUDE_DIR - Directory to include to get ICU headers # Note: always include ICU headers as, e.g., # unicode/utypes.h @@ -55,6 +56,19 @@ find_library( ) mark_as_advanced(ICU_LIBRARY) +# Look for the binary path. +find_program( + tmp_DIR + NAMES genccode uconv + PATHS + ${icu_root}/bin/ + ${_program_FILES_DIR}/icu/bin/ + /usr/local/opt/icu4c/bin/ +) +get_filename_component(tmp_DIR ${tmp_DIR} DIRECTORY) +set(ICU_BINARY_DIR ${tmp_DIR} CACHE DOC "Runtime binaries directory for the ICU library") +mark_as_advanced(ICU_BINARY_DIR) + # Copy the results to the output variables. if(ICU_INCLUDE_DIR AND ICU_LIBRARY) set(ICU_FOUND 1) |