2024-02-02 07:05:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# avcpp doesn't export any symbols
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2022-12-29 04:58:54 +08:00
|
|
|
|
2021-05-19 07:00:50 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO h4tr3d/avcpp
|
2022-12-29 04:58:54 +08:00
|
|
|
REF "v${VERSION}"
|
2024-03-12 03:50:01 +08:00
|
|
|
SHA512 10e3ab6bb52ceee2f7d6ea9364dbf5f09fdab5b10f34920f1a1df93ad853e0a4b3de9b554be8482d8444b62e10160c3e26f37907fee217bc9d5728329e06ad85
|
2021-05-19 07:00:50 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2021-06-10 06:25:20 +08:00
|
|
|
0002-av_init_packet_deprecation.patch
|
2021-10-29 09:10:59 +08:00
|
|
|
fix-pkgconfig-location.patch
|
2021-05-19 07:00:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AVCPP_ENABLE_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" AVCPP_ENABLE_SHARED)
|
|
|
|
|
2024-02-02 07:05:10 +08:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
2022-12-29 04:58:54 +08:00
|
|
|
|
2021-05-19 07:00:50 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-10-29 09:10:59 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-05-19 07:00:50 +08:00
|
|
|
OPTIONS
|
2021-10-29 09:10:59 +08:00
|
|
|
"-DAV_ENABLE_STATIC=${AVCPP_ENABLE_STATIC}"
|
|
|
|
"-DAV_ENABLE_SHARED=${AVCPP_ENABLE_SHARED}"
|
2024-02-02 07:05:10 +08:00
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
2021-05-19 07:00:50 +08:00
|
|
|
-DAV_BUILD_EXAMPLES=OFF
|
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
2021-10-29 09:10:59 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-05-19 07:00:50 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
2024-02-02 07:05:10 +08:00
|
|
|
file(READ "${SOURCE_PATH}/LICENSE.md" LICENSE_MD)
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-bsd.txt" "${SOURCE_PATH}/LICENSE-lgpl2.txt" COMMENT "${LICENSE_MD}")
|