From 9f051a093f104d60efc9fd69b74fc31948f1bcb9 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 18 May 2020 19:40:18 +0200 Subject: [PATCH] [libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx (#11072) * [libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx * update baseline * update baseline --- ports/libxml2/CONTROL | 2 +- ports/libxml2/vcpkg-cmake-wrapper.cmake | 35 +++++++++++++------------ scripts/ci.baseline.txt | 3 +-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index ccf2a9c60f..80a0bc7e04 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,5 +1,5 @@ Source: libxml2 -Version: 2.9.9-5 +Version: 2.9.9-6 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 50eca4d616..8c81e2267f 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -2,24 +2,25 @@ _find_package(${ARGS}) if(LibXml2_FOUND) find_package(LibLZMA) find_package(ZLIB) - + include(SelectLibraryConfigurations) + find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib) + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) + select_library_configurations(ICONV) + select_library_configurations(CHARSET) list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) - - if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND LIBXML2_LIBRARIES - 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 - 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") + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) + else() + list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) + if(TARGET LibXml2::LibXml2) + target_link_libraries(LibXml2::LibXml2 INTERFACE ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) + endif() + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + list(APPEND LIBXML2_LIBRARIES ws2_32) endif() endif() diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 3d118c6d37..5c34d8e6e7 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -260,7 +260,6 @@ cmcstl2:x86-windows = skip coin:arm64-windows=fail coin:arm-uwp=fail coin:x64-uwp=fail -collada-dom:x64-osx=fail collada-dom:x64-windows-static=fail coolprop:arm-uwp=fail coolprop:x64-linux=fail @@ -1690,7 +1689,7 @@ shiva-sfml:x86-windows=fail shiva-sfml:x64-windows=fail shogun:arm64-windows = skip shogun:arm-uwp = skip -shogun:x64-osx=fail +shogun:x64-osx = skip shogun:x64-uwp = skip shogun:x64-windows = skip shogun:x64-windows-static = skip