fix: change FindICU to properly check pkg-config results

While skiping this checks for Android. Idealy it would also be done in
Android, something to improve a in future release.
This commit is contained in:
2024-04-06 14:02:23 +01:00
parent b367b37808
commit 784566409c

View File

@@ -42,13 +42,14 @@ 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)
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
find_library(PC_ICU_${MOD_NAME}_LIBRARY NAMES ${LIBRARY})
find_library(PC_LIBRARY NAMES ${LIBRARY})
endif()
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
unset(PC_ICU_${MOD_NAME}_FOUND)
endif()
list(APPEND PC_LIBRARIES ${PC_ICU_${MOD_NAME}_LIBRARY})
list(APPEND PC_LIBRARIES ${PC_LIBRARY})
endforeach()
unset(PC_LIBRARY CACHE)