From b9bee6035182254ac14f371cc7b238582e4d621c Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jul 2024 07:26:20 +0000 Subject: [PATCH] use built-in find icu module --- CMakeLists.txt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 937faa4b0e..a2471986e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,16 +247,15 @@ IF(WITH_STATIC) ENDIF() # under Linux and OS X, recent libxml2 versions are linked against libicu - # FIND_PACKAGE(Icu) - FIND_LIBRARY(ICU_LIBRARY icuuc) - IF(ICU_LIBRARY) - FIND_LIBRARY(ICU_DATA_LIBRARY icudata) - IF(ICU_LIBRARY) - MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}") - ELSE() - MESSAGE(STATUS "ICU UC was NOT found") - ENDIF() - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY}) + FIND_PACKAGE(ICU COMPONENTS data uc) + IF(ICU_FOUND) + IF(ICU_UC_FOUND) + MESSAGE(STATUS "ICU uc was found: ${ICU_LIBRARIES}") + ENDIF() + IF(ICU_DATA_FOUND) + MESSAGE(STATUS "ICU data was found: ${ICU_LIBRARIES}") + ENDIF() + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ICU::data ICU::uc) ENDIF() ENDIF()