Skip to content

Commit

Permalink
[libwebm] Add export config (microsoft#42040)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored Nov 18, 2024
1 parent 1e14cd7 commit 84a143e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
25 changes: 25 additions & 0 deletions ports/libwebm/fix-export-config.patch
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion ports/libwebm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
Fix-cmake.patch
fix-export-config.patch
)

vcpkg_cmake_configure(
Expand All @@ -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")
1 change: 1 addition & 0 deletions ports/libwebm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5342,7 +5342,7 @@
},
"libwebm": {
"baseline": "1.0.0.31",
"port-version": 0
"port-version": 1
},
"libwebp": {
"baseline": "1.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libwebm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1cfbac17267892f7a391ad56353f624a80451f88",
"version": "1.0.0.31",
"port-version": 1
},
{
"git-tree": "a1c52d996474cadfc08a913ec80155b1693c7af5",
"version": "1.0.0.31",
Expand Down

0 comments on commit 84a143e

Please sign in to comment.