2021-06-04 03:56:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO AOMediaCodec/libavif
|
2023-02-24 03:21:03 +08:00
|
|
|
REF "v${VERSION}"
|
2024-01-27 08:46:40 +08:00
|
|
|
SHA512 b713f35fd3e54e105e16f46012becdada86f522b4ed8ab7097a93fd437524b4f2c997c42d6f06828f93b53253b1d90302417afdb0bd8e09d176f64f19c7a0faa
|
2021-06-04 03:56:33 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
disable-source-utf8.patch
|
2023-04-14 05:50:45 +08:00
|
|
|
find-dependency.patch # from https://github.com/AOMediaCodec/libavif/pull/1339
|
2021-06-04 03:56:33 +08:00
|
|
|
)
|
|
|
|
|
2023-08-29 15:20:42 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
aom AVIF_CODEC_AOM
|
|
|
|
)
|
|
|
|
|
2021-06-04 03:56:33 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-07-06 05:59:22 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-06-04 03:56:33 +08:00
|
|
|
OPTIONS
|
|
|
|
-DAVIF_BUILD_APPS=OFF
|
2023-04-14 05:50:45 +08:00
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_libyuv=ON
|
2023-08-29 15:20:42 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-06-04 03:56:33 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
2022-07-06 05:59:22 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-06-04 03:56:33 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-02-24 03:21:03 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|