diff options
author | Brad King <brad.king@kitware.com> | 2020-11-06 13:02:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-11-06 13:02:30 (GMT) |
commit | 5696be33a6017b96e079a265a2406566f88bf272 (patch) | |
tree | 11c89d7b14a337569ff98a245f5c896506a5033a /Modules | |
parent | 02d6c98210bcb975b61a9aadab14dbf593014d6a (diff) | |
parent | 21cb5886296135dbf14be97e43aee19b846cd27f (diff) | |
download | CMake-5696be33a6017b96e079a265a2406566f88bf272.zip CMake-5696be33a6017b96e079a265a2406566f88bf272.tar.gz CMake-5696be33a6017b96e079a265a2406566f88bf272.tar.bz2 |
Merge topic 'FindICU-naming'
21cb588629 FindICU: Correct variable names to match documentation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5451
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindICU.cmake | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Modules/FindICU.cmake b/Modules/FindICU.cmake index d3e5380..fa0cba3 100644 --- a/Modules/FindICU.cmake +++ b/Modules/FindICU.cmake @@ -186,7 +186,8 @@ function(_ICU_FIND) set(component_cache "ICU_${component_upcase}_LIBRARY") set(component_cache_release "${component_cache}_RELEASE") set(component_cache_debug "${component_cache}_DEBUG") - set(component_found "${component_upcase}_FOUND") + set(component_found "ICU_${component_upcase}_FOUND") + set(component_found_compat "${component_upcase}_FOUND") set(component_libnames "icu${component}") set(component_debug_libnames "icu${component}d") @@ -248,12 +249,15 @@ function(_ICU_FIND) mark_as_advanced("${component_cache_release}" "${component_cache_debug}") if(${component_cache}) set("${component_found}" ON) + set("${component_found_compat}" ON) list(APPEND ICU_LIBRARY "${${component_cache}}") endif() mark_as_advanced("${component_found}") + mark_as_advanced("${component_found_compat}") set("${component_cache}" "${${component_cache}}" PARENT_SCOPE) set("${component_found}" "${${component_found}}" PARENT_SCOPE) - if(${component_found}) + set("${component_found_compat}" "${${component_found_compat}}" PARENT_SCOPE) + if(component_found OR component_found_compat) if (ICU_FIND_REQUIRED_${component}) list(APPEND ICU_LIBS_FOUND "${component} (required)") else() @@ -344,7 +348,7 @@ if(ICU_FOUND) set(_ICU_component_cache_release "ICU_${_ICU_component_upcase}_LIBRARY_RELEASE") set(_ICU_component_cache_debug "ICU_${_ICU_component_upcase}_LIBRARY_DEBUG") set(_ICU_component_lib "ICU_${_ICU_component_upcase}_LIBRARIES") - set(_ICU_component_found "${_ICU_component_upcase}_FOUND") + set(_ICU_component_found "ICU_${_ICU_component_upcase}_FOUND") set(_ICU_imported_target "ICU::${_ICU_component}") if(${_ICU_component_found}) set("${_ICU_component_lib}" "${${_ICU_component_cache}}") @@ -398,7 +402,7 @@ if(ICU_DEBUG) foreach(program IN LISTS icu_programs) string(TOUPPER "${program}" program_upcase) set(program_lib "ICU_${program_upcase}_EXECUTABLE") - message(STATUS "${program} program: ${${program_lib}}") + message(STATUS "${program} program: ${program_lib}=${${program_lib}}") unset(program_upcase) unset(program_lib) endforeach() @@ -407,7 +411,7 @@ if(ICU_DEBUG) string(TOUPPER "${data}" data_upcase) string(REPLACE "." "_" data_upcase "${data_upcase}") set(data_lib "ICU_${data_upcase}") - message(STATUS "${data} data: ${${data_lib}}") + message(STATUS "${data} data: ${data_lib}=${${data_lib}}") unset(data_upcase) unset(data_lib) endforeach() @@ -415,12 +419,15 @@ if(ICU_DEBUG) foreach(component IN LISTS ICU_FIND_COMPONENTS) string(TOUPPER "${component}" component_upcase) set(component_lib "ICU_${component_upcase}_LIBRARIES") - set(component_found "${component_upcase}_FOUND") - message(STATUS "${component} library found: ${${component_found}}") - message(STATUS "${component} library: ${${component_lib}}") + set(component_found "ICU_${component_upcase}_FOUND") + set(component_found_compat "${component_upcase}_FOUND") + message(STATUS "${component} library found: ${component_found}=${${component_found}}") + message(STATUS "${component} library found (compat name): ${component_found_compat}=${${component_found_compat}}") + message(STATUS "${component} library: ${component_lib}=${${component_lib}}") unset(component_upcase) unset(component_lib) unset(component_found) + unset(component_found_compat) endforeach() message(STATUS "----------------") endif() |