fix: Restore FindICU

fix: update CMakeLists to new format
This commit is contained in:
2024-04-06 01:31:03 +01:00
parent f312cf0f91
commit b367b37808
2 changed files with 9 additions and 8 deletions

View File

@@ -42,12 +42,13 @@ foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS)
# Check the libraries returned by pkg-config really exist.
unset(PC_LIBRARIES)
foreach(LIBRARY IN LISTS PC_ICU_${MOD_NAME}_LIBRARIES)
unset(PC_LIBRARY CACHE)
find_library(PC_LIBRARY NAMES ${LIBRARY})
if(NOT PC_LIBRARY)
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
find_library(PC_ICU_${MOD_NAME}_LIBRARY NAMES ${LIBRARY})
endif()
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
unset(PC_ICU_${MOD_NAME}_FOUND)
endif()
list(APPEND PC_LIBRARIES ${PC_LIBRARY})
list(APPEND PC_LIBRARIES ${PC_ICU_${MOD_NAME}_LIBRARY})
endforeach()
unset(PC_LIBRARY CACHE)