From bd4cdff20a7a0e148651ec000fa6b5b0b0f6d96c Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 26 Oct 2024 11:15:57 +0200 Subject: [PATCH] [libxmlmm] Fix exported config (#41770) --- ports/libxmlmm/CMakeLists.txt | 5 ++++- ports/libxmlmm/portfile.cmake | 6 +++--- ports/libxmlmm/unofficial-libxmlmm-config.cmake | 2 +- ports/libxmlmm/vcpkg.json | 7 +++++-- versions/baseline.json | 2 +- versions/l-/libxmlmm.json | 5 +++++ 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ports/libxmlmm/CMakeLists.txt b/ports/libxmlmm/CMakeLists.txt index e423c6df73..98b281ff54 100644 --- a/ports/libxmlmm/CMakeLists.txt +++ b/ports/libxmlmm/CMakeLists.txt @@ -40,7 +40,7 @@ target_link_libraries (libxmlmm PUBLIC LibXml2::LibXml2) set_target_properties(libxmlmm PROPERTIES CXX_STANDARD 17 PUBLIC_HEADER "${HEADERS_LIBXMLMM}" - PREFIX "" + OUTPUT_NAME xmlmm ) target_include_directories(libxmlmm PUBLIC @@ -58,3 +58,6 @@ install(EXPORT unofficial-libxmlmm-targets NAMESPACE unofficial::libxmlmm:: DESTINATION share/unofficial-libxmlmm ) + +configure_file(libxmlmm.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libxmlmm.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxmlmm.pc DESTINATION lib/pkgconfig) diff --git a/ports/libxmlmm/portfile.cmake b/ports/libxmlmm/portfile.cmake index b676af2f12..c13f65f564 100644 --- a/ports/libxmlmm/portfile.cmake +++ b/ports/libxmlmm/portfile.cmake @@ -5,16 +5,16 @@ vcpkg_from_github( SHA512 4f619e730de2f88b891ef31dd7ced2e6be75fff7f3852ec178843bf8d099d2e1ea84e0fcde35ff7fefc201b026f63e4b5d55f88e48334c49a0333be0327894df HEAD_REF master ) - file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DVERSION=${VERSION} ) - vcpkg_cmake_install() - vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libxmlmm") vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libxmlmm) diff --git a/ports/libxmlmm/unofficial-libxmlmm-config.cmake b/ports/libxmlmm/unofficial-libxmlmm-config.cmake index 16a46deec0..b56118b35b 100644 --- a/ports/libxmlmm/unofficial-libxmlmm-config.cmake +++ b/ports/libxmlmm/unofficial-libxmlmm-config.cmake @@ -1,3 +1,3 @@ include(CMakeFindDependencyMacro) find_dependency(LibXml2) -include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-config.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-targets.cmake") diff --git a/ports/libxmlmm/vcpkg.json b/ports/libxmlmm/vcpkg.json index 2de6d14465..488051ae46 100644 --- a/ports/libxmlmm/vcpkg.json +++ b/ports/libxmlmm/vcpkg.json @@ -1,12 +1,15 @@ { "name": "libxmlmm", "version": "0.6.0", - "port-version": 3, + "port-version": 4, "description": "Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and libxml2.", "homepage": "https://github.com/rioki/libxmlmm", "license": "MIT", "dependencies": [ - "libxml2", + { + "name": "libxml2", + "default-features": false + }, { "name": "vcpkg-cmake", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index c2c75f27a3..61cfba74d2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5406,7 +5406,7 @@ }, "libxmlmm": { "baseline": "0.6.0", - "port-version": 3 + "port-version": 4 }, "libxmlpp": { "baseline": "5.4.0", diff --git a/versions/l-/libxmlmm.json b/versions/l-/libxmlmm.json index a002ea62a4..12b30202c2 100644 --- a/versions/l-/libxmlmm.json +++ b/versions/l-/libxmlmm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b0aafeafa03267c54dcf9ec20c4f03ada74e13e6", + "version": "0.6.0", + "port-version": 4 + }, { "git-tree": "5f54a7f6dadcf5781a5d48d22a113f5f37af0956", "version": "0.6.0",