[aom] Update to 3.9.1 (#40477)

This commit is contained in:
Kai Pastor 2024-08-16 09:31:43 +02:00 committed by GitHub
parent 41dfc53c31
commit 5ff58d61e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 65 additions and 110 deletions

View File

@ -1,75 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18190f647..f4b1b359d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,9 @@ endif()
project(AOM C CXX)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
# GENERATED source property global visibility.
if(POLICY CMP0118)
cmake_policy(SET CMP0118 NEW)
@@ -302,6 +305,52 @@ if(BUILD_SHARED_LIBS)
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_static)
endif()
+set(PUBLIC_HEADERS
+ aom/aom.h
+ aom/aom_codec.h
+ aom/aom_decoder.h
+ aom/aom_encoder.h
+ aom/aom_frame_buffer.h
+ aom/aom_image.h
+ aom/aom_integer.h
+ aom/aomcx.h
+ aom/aomdx.h
+)
+
+set_target_properties(aom PROPERTIES
+ PUBLIC_HEADER "${PUBLIC_HEADERS}")
+
+
+target_include_directories(aom
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include>)
+
+install(TARGETS aom
+ EXPORT unofficial-aom-targets
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom")
+
+install(EXPORT unofficial-aom-targets
+ FILE unofficial-aom-targets.cmake
+ NAMESPACE unofficial::
+ DESTINATION lib/cmake/aom)
+
+configure_package_config_file(cmake/aom-config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake
+ INSTALL_DESTINATION lib/cmake/aom
+ NO_SET_AND_CHECK_MACRO
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+
+write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake
+ VERSION ${SO_FILE_VERSION}
+ COMPATIBILITY SameMajorVersion)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake
+ DESTINATION lib/cmake/aom)
+
# Setup dependencies.
if(CONFIG_THREE_PASS)
setup_ivf_dec_targets()
diff --git a/cmake/aom-config.cmake.in b/cmake/aom-config.cmake.in
new file mode 100644
index 000000000..91cac3b5b
--- /dev/null
+++ b/cmake/aom-config.cmake.in
@@ -0,0 +1,2 @@
+@PACKAGE_INIT@
+include(${CMAKE_CURRENT_LIST_DIR}/unofficial-aom-targets.cmake)

View File

@ -0,0 +1,36 @@
diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
index 2c263e9..fc9c2ca 100644
--- a/build/cmake/aom_install.cmake
+++ b/build/cmake/aom_install.cmake
@@ -91,8 +91,31 @@ macro(setup_aom_install_targets)
install(FILES "${AOM_PKG_CONFIG_FILE}"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
install(TARGETS ${AOM_INSTALL_LIBS};${AOM_INSTALL_BINS}
+ EXPORT unofficial-aom-targets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ target_include_directories(aom PUBLIC $<INSTALL_INTERFACE:include>)
+ install(EXPORT unofficial-aom-targets
+ FILE unofficial-aom-targets.cmake
+ NAMESPACE unofficial::
+ DESTINATION share/aom)
+ include(CMakePackageConfigHelpers)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake.in [[
+@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_dependency(Threads)
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-aom-targets.cmake")
+]])
+ configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake
+ INSTALL_DESTINATION lib/cmake/aom
+ NO_SET_AND_CHECK_MACRO
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake
+ VERSION ${SO_FILE_VERSION}
+ COMPATIBILITY SameMajorVersion)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/aom-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/aom-config-version.cmake
+ DESTINATION share/aom)
endif()
endmacro()

View File

@ -1,24 +1,17 @@
# NASM is required to build AOM
vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_add_to_path(${NASM_EXE_PATH})
# Perl is required to build AOM
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL "https://aomedia.googlesource.com/aom"
REF bb6430482199eaefbeaaa396600935082bc43f66
REF 8ad484f8a18ed1853c094e7d3a4e023b2a92df28 # v3.9.1
HEAD_REF main
PATCHES
aom-rename-static.diff
aom-uninitialized-pointer.diff
# Can be dropped when https://bugs.chromium.org/p/aomedia/issues/detail?id=3029 is merged into the upstream
aom-install.diff
export-config.diff
)
vcpkg_find_acquire_program(NASM)
vcpkg_find_acquire_program(PERL)
set(aom_target_cpu "")
if(VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "^arm"))
# UWP + aom's assembler files result in weirdness and build failures
@ -27,7 +20,7 @@ if(VCPKG_TARGET_IS_UWP OR (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_TARGET_IS_LINUX)
set(aom_target_cpu "-DENABLE_NEON=OFF")
set(aom_target_cpu "-DENABLE_NEON=OFF")
endif()
vcpkg_cmake_configure(
@ -39,29 +32,26 @@ vcpkg_cmake_configure(
-DENABLE_TESTDATA=OFF
-DENABLE_TESTS=OFF
-DENABLE_TOOLS=OFF
-DTHREADS_PREFER_PTHREAD_FLAGS=ON
"-DCMAKE_ASM_NASM_COMPILER=${NASM}"
"-DPERL_EXECUTABLE=${PERL}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/aom.pc" " -lm" "")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/aom.pc" " -lm" "")
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VPCKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/aom.pc" " -lm" "")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/aom.pc" " -lm" "")
endif()
endif()
# Move cmake configs
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
# Remove duplicate files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_fixup_pkgconfig()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,7 +1,6 @@
{
"name": "aom",
"version-semver": "3.8.1",
"port-version": 1,
"version-semver": "3.9.1",
"description": "AV1 codec library",
"homepage": "https://aomedia.googlesource.com/aom",
"license": "BSD-2-Clause",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "29d864e5f5c61978785ca554e8efcd1d9642010b",
"version-semver": "3.9.1",
"port-version": 0
},
{
"git-tree": "827f4b94a5792e8fadee085ce2542979d42436c9",
"version-semver": "3.8.1",

View File

@ -153,8 +153,8 @@
"port-version": 2
},
"aom": {
"baseline": "3.8.1",
"port-version": 1
"baseline": "3.9.1",
"port-version": 0
},
"apache-datasketches": {
"baseline": "5.0.2",