vcpkg/ports/aom/portfile.cmake
Dmitry Baryshev 835f1613b5
[aom] Add new port (#18083)
* [aom] Add new port

* [aom] vcpkg x-add-version --all

* [aom] Added versions/a-/aom.json

* [aom] Fixes after review

* [aom] vcpkg x-add-version --all --overwrite-version

* [aom] Remove usage

* [aom] vcpkg x-add-version --all --overwrite-version

* [aom] Update ports/aom/portfile.cmake

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* [aom] vcpkg x-add-version --all --overwrite-version

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
2021-06-01 12:20:31 -07:00

47 lines
1.3 KiB
CMake

vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP")
# 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 33aff8586e35ffe385637f6aa2c991858c0fb58e
TAG v3.1.0
PATCHES
aom-rename-static.diff
# Can be dropped when https://bugs.chromium.org/p/aomedia/issues/detail?id=3029 is merged into the upstream
aom-install.diff
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DENABLE_DOCS=OFF
-DENABLE_EXAMPLES=OFF
-DENABLE_TESTDATA=OFF
-DENABLE_TESTS=OFF
-DENABLE_TOOLS=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Move cmake configs
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
# 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)