vcpkg/ports/dav1d/portfile.cmake

40 lines
1.3 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}"
2024-08-20 00:47:54 +08:00
SHA512 1a7ed31a5c56362d7e62a7b96eeb13d636309cef892fab7bedee2421e1c6cea8676abb640318a2eb5c7bb597110c53cac1b4583ba3b844581d96a54cad3dbd9e
)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_add_to_path(${NASM_EXE_PATH})
elseif (VCPKG_TARGET_IS_WINDOWS)
vcpkg_find_acquire_program(GASPREPROCESSOR)
foreach(GAS_PATH ${GASPREPROCESSOR})
get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
vcpkg_add_to_path(${GAS_ITEM_PATH})
endforeach(GAS_PATH)
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")