[libwebm] Add export config (#42040)

This commit is contained in:
jim wang 2024-11-18 05:51:58 +00:00 committed by GitHub
parent 1e14cd769a
commit 84a143e4ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 34 additions and 2 deletions

View File

@ -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_INTERFACE:include>)
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)

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master HEAD_REF master
PATCHES PATCHES
Fix-cmake.patch Fix-cmake.patch
fix-export-config.patch
) )
vcpkg_cmake_configure( vcpkg_cmake_configure(
@ -21,7 +22,7 @@ vcpkg_cmake_configure(
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libwebm)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.TXT") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.TXT")

View File

@ -1,6 +1,7 @@
{ {
"name": "libwebm", "name": "libwebm",
"version": "1.0.0.31", "version": "1.0.0.31",
"port-version": 1,
"description": "WebM File Parser", "description": "WebM File Parser",
"homepage": "https://github.com/webmproject/libwebm", "homepage": "https://github.com/webmproject/libwebm",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View File

@ -5342,7 +5342,7 @@
}, },
"libwebm": { "libwebm": {
"baseline": "1.0.0.31", "baseline": "1.0.0.31",
"port-version": 0 "port-version": 1
}, },
"libwebp": { "libwebp": {
"baseline": "1.4.0", "baseline": "1.4.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "1cfbac17267892f7a391ad56353f624a80451f88",
"version": "1.0.0.31",
"port-version": 1
},
{ {
"git-tree": "a1c52d996474cadfc08a913ec80155b1693c7af5", "git-tree": "a1c52d996474cadfc08a913ec80155b1693c7af5",
"version": "1.0.0.31", "version": "1.0.0.31",