From 26835480dc473361fea8b81af8772007e83332f2 Mon Sep 17 00:00:00 2001 From: Markus Rickert Date: Wed, 30 Dec 2020 14:28:24 +0100 Subject: [PATCH] Fix ICU build in CMake --- CMakeLists.txt | 4 ++-- libxml2-config.cmake.cmake.in | 2 +- libxml2-config.cmake.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f7e5c7c..6b67010a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ if(LIBXML2_WITH_ICONV) endif() if(LIBXML2_WITH_ICU) - find_package(ICU REQUIRED) + find_package(ICU REQUIRED COMPONENTS data i18n uc) endif() if(LIBXML2_WITH_LZMA) @@ -463,7 +463,7 @@ if(LIBXML2_WITH_ICONV) endif() if(LIBXML2_WITH_ICU) - target_link_libraries(LibXml2 PRIVATE ICU::i18n) + target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) if(WIN32) set(ICU_LIBS "-licudt -licuin -licuuc") else() diff --git a/libxml2-config.cmake.cmake.in b/libxml2-config.cmake.cmake.in index 8614f21b..f1760572 100644 --- a/libxml2-config.cmake.cmake.in +++ b/libxml2-config.cmake.cmake.in @@ -95,7 +95,7 @@ if(NOT @BUILD_SHARED_LIBS@) endif() if(@LIBXML2_WITH_ICU@) - find_dependency(ICU) + find_dependency(ICU COMPONENTS data i18n uc) list(APPEND LIBXML2_LIBRARIES ${ICU_LIBRARIES}) list(APPEND LIBXML2_INCLUDE_DIRS ${ICU_INCLUDE_DIRS}) endif() diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in index 73112efc..cc5972e0 100644 --- a/libxml2-config.cmake.in +++ b/libxml2-config.cmake.in @@ -57,10 +57,10 @@ if(@WITH_THREADS@) endif() if(@WITH_ICU@) - find_dependency(ICU) + find_dependency(ICU COMPONENTS data i18n uc) list(APPEND LIBXML2_LIBRARIES ${ICU_LIBRARIES}) list(APPEND LIBXML2_INCLUDE_DIRS ${ICU_INCLUDE_DIRS}) - list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$;\$;\$") endif() if(@WITH_LZMA@)