Skip to content

Commit

Permalink
[libwebm] Update to 1.0.0.28 (microsoft#21031)
Browse files Browse the repository at this point in the history
* [libwebm] Update to 1.0.0.28

* add crt linkage option

Co-authored-by: Cheney-Wang <[email protected]>
Cheney-W and Cheney-Wang authored Nov 5, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9f8b8fa commit 3b45774
Showing 8 changed files with 109 additions and 128 deletions.
65 changes: 0 additions & 65 deletions ports/libwebm/0001-fix-cmake.patch

This file was deleted.

25 changes: 0 additions & 25 deletions ports/libwebm/0003-fix-android-ndk-r22.patch

This file was deleted.

76 changes: 76 additions & 0 deletions ports/libwebm/Fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a83d23b..0f5ede3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@
cmake_minimum_required(VERSION 3.2)
project(LIBWEBM CXX)

+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
include(GNUInstallDirs)
include("${CMAKE_CURRENT_SOURCE_DIR}/build/cxx_flags.cmake")

@@ -330,6 +332,30 @@ add_library(webm ${libwebm_common_sources}
$<TARGET_OBJECTS:mkvmuxer>
$<TARGET_OBJECTS:mkvparser>)

+install(
+ TARGETS webm
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+)
+
+install(
+ FILES
+ mkvmuxer/mkvmuxer.h
+ mkvmuxer/mkvmuxertypes.h
+ mkvmuxer/mkvmuxerutil.h
+ mkvmuxer/mkvwriter.h
+ mkvparser/mkvparser.h
+ mkvparser/mkvreader.h
+ webvtt/vttreader.h
+ webvtt/webvttparser.h
+ common/file_util.h
+ common/hdr_util.h
+ common/webmids.h
+ DESTINATION
+ "include/libwebm/"
+)
+
if (WIN32)
# Use libwebm and libwebm.lib for project and library name on Windows (instead
# webm and webm.lib).
@@ -337,18 +363,22 @@ if (WIN32)
set_target_properties(webm PROPERTIES PREFIX lib)
endif ()

-add_executable(mkvparser_sample ${mkvparser_sample_sources})
-target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
+if (ENABLE_SAMPLES)
+ add_executable(mkvparser_sample ${mkvparser_sample_sources})
+ target_link_libraries(mkvparser_sample LINK_PUBLIC webm)

-add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
- $<TARGET_OBJECTS:webvtt_common>)
-target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
+ add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
+ $<TARGET_OBJECTS:webvtt_common>)
+ target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
+endif()

-add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
-target_link_libraries(dumpvtt LINK_PUBLIC webm)
+if (ENABLE_TOOLS)
+ add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
+ target_link_libraries(dumpvtt LINK_PUBLIC webm)

-add_executable(vttdemux ${vttdemux_sources})
-target_link_libraries(vttdemux LINK_PUBLIC webm)
+ add_executable(vttdemux ${vttdemux_sources})
+ target_link_libraries(vttdemux LINK_PUBLIC webm)
+endif()

if (ENABLE_WEBMINFO)
add_executable(webm_info ${webm_info_sources})
20 changes: 0 additions & 20 deletions ports/libwebm/no-samples.patch

This file was deleted.

27 changes: 14 additions & 13 deletions ports/libwebm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO webmproject/libwebm
REF libwebm-1.0.0.27
SHA512 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596
REF 82a1d2330e113a14e545d806eb5419f09374255f #1.0.0.28
SHA512 7baf6f702f0e4498c9b0affebeba3ff28192c5f3dadfa5a17db2306816b3a9e31ce7a474e4d344ba136e5acf097c32d4ff61ce99861d427cdfb2f20e317d7e15
HEAD_REF master
PATCHES
0001-fix-cmake.patch
no-samples.patch
0003-fix-android-ndk-r22.patch
Fix-cmake.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
@@ -16,17 +14,20 @@ else()
set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${LIBWEBM_CRT_LINKAGE}
-DCMAKE_DEBUG_POSTFIX=d
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${LIBWEBM_CRT_LINKAGE}
-DENABLE_SAMPLES=OFF
-DENABLE_TOOLS=OFF
-DENABLE_WEBMTS=OFF
-DENABLE_WEBMINFO=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()

vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
15 changes: 12 additions & 3 deletions ports/libwebm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"name": "libwebm",
"version-string": "1.0.0.27",
"port-version": 7,
"version": "1.0.0.28",
"description": "WebM File Parser",
"homepage": "https://github.com/webmproject/libwebm"
"homepage": "https://github.com/webmproject/libwebm",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
@@ -4001,8 +4001,8 @@
"port-version": 4
},
"libwebm": {
"baseline": "1.0.0.27",
"port-version": 7
"baseline": "1.0.0.28",
"port-version": 0
},
"libwebp": {
"baseline": "1.2.1",
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": "06a8f301505eb69082e8654f0c01d724b2e403e0",
"version": "1.0.0.28",
"port-version": 0
},
{
"git-tree": "551e2b3f3b67283a71c20088413de576c9dc55c2",
"version-string": "1.0.0.27",

0 comments on commit 3b45774

Please sign in to comment.