mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix ICU build in CMake
This commit is contained in:
parent
296ab61e1c
commit
26835480dc
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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 "\$<LINK_ONLY:ICU::i18n>")
|
||||
list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:ICU::data>;\$<LINK_ONLY:ICU::i18n>;\$<LINK_ONLY:ICU::uc>")
|
||||
endif()
|
||||
|
||||
if(@WITH_LZMA@)
|
||||
|
Loading…
x
Reference in New Issue
Block a user