2020-11-24 02:50:37 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO paullouisageneau/libdatachannel
|
2023-02-10 02:46:01 +08:00
|
|
|
REF "v${VERSION}"
|
2024-08-09 12:50:28 +08:00
|
|
|
SHA512 fd0d66bb932e29abc01e9f1a8b16ccb79012a7e3901e2e0f882f56ab2f090260945e1556c85ad07ef897b8c70fcdd44cdeead9955a9bca7afe1dda8900c473cc
|
2020-11-24 02:50:37 +08:00
|
|
|
HEAD_REF master
|
2024-01-04 08:56:55 +08:00
|
|
|
PATCHES
|
2024-08-09 12:50:28 +08:00
|
|
|
dependencies.diff
|
|
|
|
library-linkage.diff
|
|
|
|
uwp-warnings.patch
|
2020-11-24 02:50:37 +08:00
|
|
|
)
|
2023-04-19 07:38:48 +08:00
|
|
|
|
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
|
2024-08-09 12:50:28 +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}
|
2023-12-05 09:20:43 +08:00
|
|
|
-DPREFER_SYSTEM_LIB=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()
|
2024-08-09 12:50:28 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LibDataChannel)
|
2020-11-24 02:50:37 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2024-08-09 12:50:28 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/rtc/common.hpp" "#ifdef RTC_STATIC" "#if 1")
|
2024-08-22 17:54:39 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/rtc/rtc.h" "#ifdef RTC_STATIC" "#if 1")
|
2024-03-02 06:30:06 +08:00
|
|
|
endif()
|
|
|
|
|
2021-09-17 23:22:11 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
2023-02-10 02:46:01 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|