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-03-08 14:36:55 +08:00
|
|
|
SHA512 37f0de757180c6414778e688006940395960b316c25192d6beb97a07942aff4bd3b712dec2eff52cd26f5d72c352731442175dfeb90e2e1381133539760142b0
|
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")
|