From 45d31c931a5406aa2b1637799b8e9f64e5ae5fc5 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Wed, 15 Jan 2020 19:33:50 +0100 Subject: [libxml2] Apply fixes to the target of libxml2 (#9636) --- ports/libxml2/CONTROL | 2 +- ports/libxml2/vcpkg-cmake-wrapper.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index 7a4b02cea..ccf2a9c60 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,5 +1,5 @@ Source: libxml2 -Version: 2.9.9-4 +Version: 2.9.9-5 Homepage: https://xmlsoft.org/ Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index b6ec9571a..50eca4d61 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -12,6 +12,13 @@ if(LibXml2_FOUND) debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib ws2_32) + if(TARGET LibXml2::LibXml2) + target_link_libraries(LibXml2::LibXml2 INTERFACE + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib) + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) endif() -- cgit v1.2.3