From 125df93c5e692cdc97204663067230c45668192a Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Sun, 31 Mar 2019 16:35:47 +1100 Subject: [xerces-c] Add libraries required on osx to target using wrapper (#5858) * [xerces-c] Add libraries required on osx to target using wrapper * [xerces-c] Bump version number --- ports/xerces-c/CONTROL | 2 +- ports/xerces-c/portfile.cmake | 6 ++++++ ports/xerces-c/vcpkg-cmake-wrapper.cmake | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/xerces-c/vcpkg-cmake-wrapper.cmake diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index 63b4e9ad1..dc204b51b 100644 --- a/ports/xerces-c/CONTROL +++ b/ports/xerces-c/CONTROL @@ -1,5 +1,5 @@ Source: xerces-c -Version: 3.2.2-7 +Version: 3.2.2-8 Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. Feature: icu diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index aa5700121..017cb7cab 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -45,6 +45,12 @@ string(REPLACE ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}") +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/xercesc + @ONLY +) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" diff --git a/ports/xerces-c/vcpkg-cmake-wrapper.cmake b/ports/xerces-c/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c6cfff8a4 --- /dev/null +++ b/ports/xerces-c/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if (APPLE) + if (TARGET XercesC::XercesC) + set_property(TARGET XercesC::XercesC APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl) + list(APPEND XercesC_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl) + endif() +endif() + -- cgit v1.2.3