mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 06:18:24 +08:00
cb263f8bb8
This feature adds dav1d (AV1 decoder) to libavif which is smaller and way faster than the AOM one that's already there. I'm actually not sure if you consider this a feature or an alternative. It's a bit of an edge case. The decoder itself is definitely an alternative to the one that's already there, but: libavif supports several codecs at once so adding both aom and dav1d at the same time works, and the user can choose the preferred codec via libavif's API surface. So pedantically spoken it adds and doesn't take away. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). (...ish) - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO AOMediaCodec/libavif
|
|
REF "v${VERSION}"
|
|
SHA512 37f0de757180c6414778e688006940395960b316c25192d6beb97a07942aff4bd3b712dec2eff52cd26f5d72c352731442175dfeb90e2e1381133539760142b0
|
|
HEAD_REF master
|
|
PATCHES
|
|
disable-source-utf8.patch
|
|
find-dependency.patch # from https://github.com/AOMediaCodec/libavif/pull/1339
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
aom AVIF_CODEC_AOM
|
|
dav1d AVIF_CODEC_DAV1D
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DAVIF_BUILD_APPS=OFF
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_libyuv=ON
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
# Move cmake configs
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
# Fix pkg-config files
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
# Remove duplicate files
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
# Handle copyright
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|