vcpkg/ports/libdatachannel/portfile.cmake
Vladimir Voronin 4c820a2c33
[libdatachannel] update to 0.16.0 (#22048)
* update libdatachannel to 0.16.0

* update libdatachannel to 0.16.0

* delete port-version

* update version

Co-authored-by: Jonliu1993 <13720414433@163.com>
2021-12-21 23:06:10 -05:00

43 lines
1.4 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO paullouisageneau/libdatachannel
REF 6e1222c4def8b959eedc8b9e6da95072afe6ff78 #v0.16.0
SHA512 bfa21b1f55a18c6bd0473b2c80d6739e9f06d463246004f91b216423739c5fa04651a099ef995b4ab12f392784208cc0c7ab8662e3790ce4be6be36e37a944d7
HEAD_REF master
PATCHES
0001-fix-for-vcpkg.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
stdcall CAPI_STDCALL
INVERTED_FEATURES
ws NO_WEBSOCKET
srtp NO_MEDIA
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DUSE_SYSTEM_SRTP=ON
-DNO_EXAMPLES=ON
-DNO_TESTS=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME LibDataChannel CONFIG_PATH lib/cmake/LibDataChannel)
vcpkg_fixup_pkgconfig()
file(READ "${CURRENT_PACKAGES_DIR}/share/LibDataChannel/LibDataChannelConfig.cmake" DATACHANNEL_CONFIG)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/LibDataChannel/LibDataChannelConfig.cmake" "
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(OpenSSL)
find_dependency(LibJuice)
${DATACHANNEL_CONFIG}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)