2022-04-07 02:04:46 +08:00
|
|
|
set(PATCHES 0001-fix-for-vcpkg.patch)
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
list(APPEND PATCHES uwp-warnings.patch)
|
|
|
|
endif()
|
|
|
|
|
2020-11-24 02:50:37 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO paullouisageneau/libdatachannel
|
2022-08-04 01:22:54 +08:00
|
|
|
REF f8ac6955e3cd673ac23a2172cd7dc42fc013b7b3 #v0.17.9
|
|
|
|
SHA512 3a8e3a47032a1fad770639c1bac266388c87046432cd44b391f146820cf3d3a871834e104deb9fb6fa901d6f82eba8aea0baa0b0eeb7cfb24808c408b020407b
|
2020-11-24 02:50:37 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2022-04-07 02:04:46 +08:00
|
|
|
${PATCHES}
|
2020-11-24 02:50:37 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-04-10 01:01:14 +08:00
|
|
|
FEATURES
|
|
|
|
stdcall CAPI_STDCALL
|
2020-11-24 02:50:37 +08:00
|
|
|
INVERTED_FEATURES
|
2021-04-10 01:01:14 +08:00
|
|
|
ws NO_WEBSOCKET
|
|
|
|
srtp NO_MEDIA
|
2020-11-24 02:50:37 +08:00
|
|
|
)
|
|
|
|
|
2021-09-17 23:22:11 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-09-28 10:49:56 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-11-24 02:50:37 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DUSE_SYSTEM_SRTP=ON
|
2022-04-27 09:48:48 +08:00
|
|
|
-DUSE_SYSTEM_JUICE=ON
|
2020-11-24 02:50:37 +08:00
|
|
|
-DNO_EXAMPLES=ON
|
|
|
|
-DNO_TESTS=ON
|
|
|
|
)
|
|
|
|
|
2021-09-17 23:22:11 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-11-24 02:50:37 +08:00
|
|
|
|
2021-09-28 10:49:56 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME LibDataChannel CONFIG_PATH lib/cmake/LibDataChannel)
|
2020-11-24 02:50:37 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2021-09-28 10:49:56 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/share/LibDataChannel/LibDataChannelConfig.cmake" DATACHANNEL_CONFIG)
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/LibDataChannel/LibDataChannelConfig.cmake" "
|
2021-07-01 23:25:25 +08:00
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(Threads)
|
|
|
|
find_dependency(OpenSSL)
|
2021-10-19 05:30:48 +08:00
|
|
|
find_dependency(LibJuice)
|
2021-07-01 23:25:25 +08:00
|
|
|
${DATACHANNEL_CONFIG}")
|
|
|
|
|
2021-09-17 23:22:11 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
2022-04-07 02:04:46 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|