vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO paullouisageneau/libdatachannel REF "v${VERSION}" SHA512 fd0d66bb932e29abc01e9f1a8b16ccb79012a7e3901e2e0f882f56ab2f090260945e1556c85ad07ef897b8c70fcdd44cdeead9955a9bca7afe1dda8900c473cc HEAD_REF master PATCHES dependencies.diff library-linkage.diff uwp-warnings.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} -DPREFER_SYSTEM_LIB=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LibDataChannel) vcpkg_fixup_pkgconfig() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/rtc/common.hpp" "#ifdef RTC_STATIC" "#if 1") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/rtc/rtc.h" "#ifdef RTC_STATIC" "#if 1") endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")