vcpkg/ports/avcpp/portfile.cmake
Matthias C. M. Troffaes 1d6e1be7ac
[ffmpeg] use pkgconfig to get system dependencies for cmake (#17985)
* [ffmpeg] use ffbuild/config.mak to get dependencies

* [ffmpeg] bump port version

* [ffmpeg] x-add-version

* [ffmpeg] fix dependency issue on x64-linux

* [ffmpeg] x-add-version

* [ffmpeg] link order fix on linux

* [ffmpeg] x-add-version

* [ffmpeg] bump port version

* [ffmpeg] x-add-version

* [ffmpeg] exclude -lgcc and -lgcc_s (causes issues on azure for unknown reasons)

* [ffmpeg] x-add-version

* [ffmpeg] handle -lgcc and -lgcc_s appropriately

* [ffmpeg] x-add-version

* [ffmpeg] use x_vcpkg_pkgconfig_get_modules to get info, added some more fixes to generated for pkgconfig files

* [ffmpeg] report dependencies (for now, helps debugging)

* [vcpkg-pkgconfig-get-modules] bump port version

* [ffmpeg] [vcpkg-pkgconfig-get-modules] x-add-version

* [ffmpeg] fix variant issue

* [ffmpeg] x-add-version

* [ffmpeg] reformat manifest

* [ffmpeg] x-add-version

* [ffmpeg] remove duplicate avfilter library from dependencies

* [ffmpeg] fix -pthread / -pthreads on linux

* [ffmpeg] x-add-version

* [ffmpeg] fix dynamic builds when no libraries need to be linked

* [ffmpeg] x-add-version

* [ffmpeg] disable openh264 on uwp when building all

* [ffmpeg] x-add-version

* [avcpp] fix uwp build failure due to deprecations treated as errors

* [avcpp] bump port version

* [avcpp] x-add-version

* [avcpp] smaller patch

* [avcpp] x-add-version

* [ffmpeg] x-add-version
2021-06-09 15:25:20 -07:00

35 lines
1.2 KiB
CMake

# avcpp doesn't export any symbols
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO h4tr3d/avcpp
REF d1a39cf6e1ccfe78ababe5a65d02d57f1e65bea1
SHA512 48eb3bdd8729c9f61c53b152f0bb7283b40d2c8f043a1d6bb4fb1fadb0ceebf754822eeb7fa85edcacbca267eea0999dd9e78e378b04984db6dc25f9a6fab7d0
HEAD_REF master
PATCHES
0001-remove-problematic-compound-literal.patch
0002-av_init_packet_deprecation.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AVCPP_ENABLE_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" AVCPP_ENABLE_SHARED)
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})
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()