summaryrefslogtreecommitdiffstats
path: root/Modules/FindICU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-24 14:30:08 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-24 14:31:35 (GMT)
commit59c392b44eb2920240b05a46e7f9c069ef374558 (patch)
tree4d6a0bfa02acf8715ed22a79c9bedaafab02cb2c /Modules/FindICU.cmake
parentc22693b99df12f540480438275cd5bae1cfc5846 (diff)
downloadCMake-59c392b44eb2920240b05a46e7f9c069ef374558.zip
CMake-59c392b44eb2920240b05a46e7f9c069ef374558.tar.gz
CMake-59c392b44eb2920240b05a46e7f9c069ef374558.tar.bz2
FindICU: Pass explicit NAMES argument to find command calls
This improves readability and avoids an undocumented signature variant. Fixes: #19302
Diffstat (limited to 'Modules/FindICU.cmake')
-rw-r--r--Modules/FindICU.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/FindICU.cmake b/Modules/FindICU.cmake
index e4b4909..38081f5 100644
--- a/Modules/FindICU.cmake
+++ b/Modules/FindICU.cmake
@@ -162,7 +162,8 @@ function(_ICU_FIND)
string(TOUPPER "${program}" program_upcase)
set(cache_var "ICU_${program_upcase}_EXECUTABLE")
set(program_var "ICU_${program_upcase}_EXECUTABLE")
- find_program("${cache_var}" "${program}"
+ find_program("${cache_var}"
+ NAMES "${program}"
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_binary_suffixes}
DOC "ICU ${program} executable"
@@ -228,13 +229,15 @@ function(_ICU_FIND)
list(APPEND component_libnames ${static_component_libnames})
list(APPEND component_debug_libnames ${static_component_debug_libnames})
endif()
- find_library("${component_cache_release}" ${component_libnames}
+ find_library("${component_cache_release}"
+ NAMES ${component_libnames}
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_library_suffixes}
DOC "ICU ${component} library (release)"
NO_PACKAGE_ROOT_PATH
)
- find_library("${component_cache_debug}" ${component_debug_libnames}
+ find_library("${component_cache_debug}"
+ NAMES ${component_debug_libnames}
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_library_suffixes}
DOC "ICU ${component} library (debug)"
@@ -286,7 +289,8 @@ function(_ICU_FIND)
string(REPLACE "." "_" data_upcase "${data_upcase}")
set(cache_var "ICU_${data_upcase}")
set(data_var "ICU_${data_upcase}")
- find_file("${cache_var}" "${data}"
+ find_file("${cache_var}"
+ NAMES "${data}"
HINTS ${icu_roots}
PATH_SUFFIXES ${icu_data_suffixes}
DOC "ICU ${data} data file")