vcpkg/ports/dav1d/portfile.cmake

42 lines
1.4 KiB
CMake
Raw Normal View History

vcpkg_from_gitlab(
GITLAB_URL https://code.videolan.org
OUT_SOURCE_PATH SOURCE_PATH
REPO videolan/dav1d
REF "${VERSION}"
2023-10-13 11:13:16 +08:00
SHA512 fce702048b876794d176dffe53d21aaf6a2e9521a306a078debc26a230b5042e7888edd63eb17bd17f06f30ce51901ebf37ea504da25eb911c1b926631cde278
)
vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_add_to_path(${NASM_EXE_PATH})
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_find_acquire_program(GASPREPROCESSOR)
foreach(GAS_PATH ${GASPREPROCESSOR})
get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}")
endforeach(GAS_PATH)
endif()
endif()
set(LIBRARY_TYPE ${VCPKG_LIBRARY_LINKAGE})
if (LIBRARY_TYPE STREQUAL "dynamic")
set(LIBRARY_TYPE "shared")
endif(LIBRARY_TYPE STREQUAL "dynamic")
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
--default-library=${LIBRARY_TYPE}
-Denable_tests=false
-Denable_tools=false
)
vcpkg_install_meson()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
2023-03-07 07:39:58 +08:00
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")