mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-24 02:47:49 +08:00
61 lines
1.8 KiB
CMake
61 lines
1.8 KiB
CMake
|
# 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 6054fae218eda6e53e1e3b4f7ef0fff4877c7bf1 # v3.7.0
|
||
|
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
|
||
|
)
|
||
|
|
||
|
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
|
||
|
# Also, disable assembly on ARM and ARM64 Windows to fix compilation issues.
|
||
|
set(aom_target_cpu "-DAOM_TARGET_CPU=generic")
|
||
|
endif()
|
||
|
|
||
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_TARGET_IS_LINUX)
|
||
|
set(aom_target_cpu "-DENABLE_NEON=OFF")
|
||
|
endif()
|
||
|
|
||
|
vcpkg_cmake_configure(
|
||
|
SOURCE_PATH ${SOURCE_PATH}
|
||
|
OPTIONS
|
||
|
${aom_target_cpu}
|
||
|
-DENABLE_DOCS=OFF
|
||
|
-DENABLE_EXAMPLES=OFF
|
||
|
-DENABLE_TESTDATA=OFF
|
||
|
-DENABLE_TESTS=OFF
|
||
|
-DENABLE_TOOLS=OFF
|
||
|
)
|
||
|
|
||
|
vcpkg_cmake_install()
|
||
|
|
||
|
vcpkg_copy_pdbs()
|
||
|
|
||
|
vcpkg_fixup_pkgconfig()
|
||
|
|
||
|
# 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)
|
||
|
|
||
|
vcpkg_fixup_pkgconfig()
|