diff options
author | Brad King <brad.king@kitware.com> | 2017-10-27 13:43:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-10-27 13:44:34 (GMT) |
commit | dfaf84ca7328256348a656fb8d45e76a3f7c6b85 (patch) | |
tree | a5a9b2ff58fe5ff94332d28fbd1518fbdf024af8 | |
parent | dcca130bb00d121266935aa2be0b72957b857a7c (diff) | |
parent | 20696a53e4f3a85886c1266c45923ea67f0ad494 (diff) | |
download | CMake-dfaf84ca7328256348a656fb8d45e76a3f7c6b85.zip CMake-dfaf84ca7328256348a656fb8d45e76a3f7c6b85.tar.gz CMake-dfaf84ca7328256348a656fb8d45e76a3f7c6b85.tar.bz2 |
Merge topic 'findICU_update'
20696a53 FindICU: Add support for static libraries on Windows
606ece67 FindICU: Search in 'sbin' directories for icu tools
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1396
-rw-r--r-- | Modules/FindICU.cmake | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Modules/FindICU.cmake b/Modules/FindICU.cmake index d9705d9..aa531d5 100644 --- a/Modules/FindICU.cmake +++ b/Modules/FindICU.cmake @@ -156,7 +156,7 @@ function(_ICU_FIND) # Find all ICU programs - list(APPEND icu_binary_suffixes "${_bin64}" "bin") + list(APPEND icu_binary_suffixes "${_bin64}" "bin" "sbin") foreach(program ${icu_programs}) string(TOUPPER "${program}" program_upcase) set(cache_var "ICU_${program_upcase}_EXECUTABLE") @@ -172,6 +172,11 @@ function(_ICU_FIND) # Find all ICU libraries list(APPEND icu_library_suffixes "${_lib64}" "lib") set(ICU_REQUIRED_LIBS_FOUND ON) + set(static_prefix ) + # static icu libraries compiled with MSVC have the prefix 's' + if(MSVC) + set(static_prefix "s") + endif() foreach(component ${ICU_FIND_COMPONENTS}) string(TOUPPER "${component}" component_upcase) set(component_cache "ICU_${component_upcase}_LIBRARY") @@ -206,6 +211,20 @@ function(_ICU_FIND) list(APPEND component_debug_libnames "icui18nd") endif() + if(static_prefix) + unset(static_component_libnames) + unset(static_component_debug_libnames) + foreach(component_libname ${component_libnames}) + list(APPEND static_component_libnames + ${static_prefix}${component_libname}) + endforeach() + foreach(component_libname ${component_debug_libnames}) + list(APPEND static_component_debug_libnames + ${static_prefix}${component_libname}) + endforeach() + list(APPEND component_libnames ${static_component_libnames}) + list(APPEND component_debug_libnames ${static_component_debug_libnames}) + endif() find_library("${component_cache_release}" ${component_libnames} HINTS ${icu_roots} PATH_SUFFIXES ${icu_library_suffixes} |