From 84a143e4caf6b70db57f28d04c41df4a85c480fa Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Mon, 18 Nov 2024 05:51:58 +0000 Subject: [PATCH] [libwebm] Add export config (#42040) --- ports/libwebm/fix-export-config.patch | 25 +++++++++++++++++++++++++ ports/libwebm/portfile.cmake | 3 ++- ports/libwebm/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/l-/libwebm.json | 5 +++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 ports/libwebm/fix-export-config.patch diff --git a/ports/libwebm/fix-export-config.patch b/ports/libwebm/fix-export-config.patch new file mode 100644 index 0000000000..161b6bec7c --- /dev/null +++ b/ports/libwebm/fix-export-config.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ebb3333..8fd53ef 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -459,13 +459,19 @@ endif() + # webm_parser headers are rooted at webm/. + set_target_properties(webm PROPERTIES PUBLIC_HEADER + "${webm_parser_public_headers}") ++set_target_properties(webm PROPERTIES EXPORT_NAME libwebm) ++target_include_directories(webm PUBLIC $) + install( +- TARGETS webm ++ TARGETS webm EXPORT unofficial-libwebm-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm) + ++install(EXPORT unofficial-libwebm-targets ++ FILE unofficial-libwebm-config.cmake ++ NAMESPACE unofficial::libwebm:: ++ DESTINATION share/unofficial-libwebm) + # Install common headers into a subdirectory to avoid breaking nested includes. + install(FILES ${libwebm_common_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/common) diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake index 46ab340533..de67ba446b 100644 --- a/ports/libwebm/portfile.cmake +++ b/ports/libwebm/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES Fix-cmake.patch + fix-export-config.patch ) vcpkg_cmake_configure( @@ -21,7 +22,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() - +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libwebm) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.TXT") diff --git a/ports/libwebm/vcpkg.json b/ports/libwebm/vcpkg.json index 702d46d7f7..7d5925a174 100644 --- a/ports/libwebm/vcpkg.json +++ b/ports/libwebm/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libwebm", "version": "1.0.0.31", + "port-version": 1, "description": "WebM File Parser", "homepage": "https://github.com/webmproject/libwebm", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index ecd943df0c..b716f0aa75 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5342,7 +5342,7 @@ }, "libwebm": { "baseline": "1.0.0.31", - "port-version": 0 + "port-version": 1 }, "libwebp": { "baseline": "1.4.0", diff --git a/versions/l-/libwebm.json b/versions/l-/libwebm.json index 203ce71b78..0aae20744b 100644 --- a/versions/l-/libwebm.json +++ b/versions/l-/libwebm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1cfbac17267892f7a391ad56353f624a80451f88", + "version": "1.0.0.31", + "port-version": 1 + }, { "git-tree": "a1c52d996474cadfc08a913ec80155b1693c7af5", "version": "1.0.0.31",