mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 23:11:08 +08:00
53c5721b00
Fixes #38582. PR https://github.com/h4tr3d/avcpp/pull/137 submitted to upstream has been merged, and a new version has been released by upstream, so updating to 2.4.0 fixes the issue: ``` 1> [CMake] CMake Error at build/debug/vcpkg_installed/x64-windows/share/avcpp/avcpp-targets.cmake:61 (set_target_properties): 1> [CMake] The link interface of target "avcpp::avcpp" contains: 1> [CMake] 1> [CMake] Threads::Threads 1> [CMake] 1> [CMake] but the target was not found. Possible reasons include: 1> [CMake] 1> [CMake] * There is a typo in the target name. 1> [CMake] * A find_package call is missing for an IMPORTED target. 1> [CMake] * An ALIAS target is missing. 1> [CMake] 1> [CMake] Call Stack (most recent call first): 1> [CMake] build/debug/vcpkg_installed/x64-windows/share/avcpp/avcpp-config.cmake:26 (include) 1> [CMake] vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package) 1> [CMake] CMakeLists.txt:16 (find_package) ``` - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~SHA512s are updated for each updated download.~ - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version.~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
40 lines
1.3 KiB
CMake
40 lines
1.3 KiB
CMake
if(VCPKG_TARGET_IS_WINDOWS)
|
|
# avcpp doesn't export any symbols
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO h4tr3d/avcpp
|
|
REF "v${VERSION}"
|
|
SHA512 365ed55e0c2bf2a699899ed6e303fe28fb9d51286579e9d7d1586132c8ab1b09c4b66e94f8061e860d73b60a28fa44769dcfdf030cb0947acfb7cdfd616127d9
|
|
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)
|
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
"-DAV_ENABLE_STATIC=${AVCPP_ENABLE_STATIC}"
|
|
"-DAV_ENABLE_SHARED=${AVCPP_ENABLE_SHARED}"
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
|
-DAV_BUILD_EXAMPLES=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(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}")
|