# avcpp doesn't export any symbols vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO h4tr3d/avcpp REF "v${VERSION}" SHA512 1e66afcf9a1f1085001aab9eb270cbbc6930cc42e60567300676d220120c421c44d24c7aeccb0b5c3ebd9de574ca1efbc67a29c681e3e11a796c32cc370069e4 HEAD_REF master PATCHES 0002-av_init_packet_deprecation.patch fix-pkgconfig-location.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AVCPP_ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" AVCPP_ENABLE_SHARED) if(NOT HOST_TRIPLET STREQUAL TARGET_TRIPLET) vcpkg_add_to_path(${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf) endif() vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS "-DAV_ENABLE_STATIC=${AVCPP_ENABLE_STATIC}" "-DAV_ENABLE_SHARED=${AVCPP_ENABLE_SHARED}" -DAV_BUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs()