diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel | |
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel')
3 files changed, 62 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/cmake-project.diff b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/cmake-project.diff new file mode 100644 index 0000000..2d2302f --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/cmake-project.diff @@ -0,0 +1,29 @@ +diff --git a/examples/streamer/CMakeLists.txt b/examples/streamer/CMakeLists.txt +index 1bdeb7c..9cf65dd 100644 +--- a/examples/streamer/CMakeLists.txt ++++ b/examples/streamer/CMakeLists.txt +@@ -2,6 +2,15 @@ cmake_minimum_required(VERSION 3.7) + if(POLICY CMP0079) + cmake_policy(SET CMP0079 NEW) + endif() ++project(vcpkg-ci) ++add_definitions(-DWIN32_LEAN_AND_MEAN) ++set(THREADS_PREFER_PTHREAD_FLAG ON) ++find_package(Threads REQUIRED) ++find_package(nlohmann_json CONFIG REQUIRED) ++find_package(LibDataChannel CONFIG REQUIRED) ++if(NOT TARGET LibDataChannel::LibDataChannel) ++ add_library(LibDataChannel::LibDataChannel ALIAS LibDataChannel::LibDataChannelStatic) ++endif() + + set(STREAMER_SOURCES + main.cpp +@@ -47,7 +56,7 @@ set_target_properties(streamer PROPERTIES + find_package(Threads REQUIRED) + target_link_libraries(streamer LibDataChannel::LibDataChannel Threads::Threads nlohmann_json::nlohmann_json) + +-if(MSVC) ++if(0) + add_custom_command(TARGET streamer POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "$<TARGET_FILE_DIR:datachannel>/datachannel.dll" diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/portfile.cmake new file mode 100644 index 0000000..1e6cc15 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/portfile.cmake @@ -0,0 +1,14 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO paullouisageneau/libdatachannel + REF v0.23.2 + SHA512 49e19e40874167ef505829841a8b944f8489cb7a15ff6e5a8d74c886c5ff28a32c2724871be2244c805dd6b0919878e06d31c43b27c8d242222adae8509e0d59 + HEAD_REF master + PATCHES + cmake-project.diff +) + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}/examples/streamer") +vcpkg_cmake_build() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/vcpkg.json new file mode 100644 index 0000000..8d6056f --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libdatachannel/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "vcpkg-ci-libdatachannel", + "version-string": "ci", + "description": "Validates libdatachannel", + "dependencies": [ + { + "name": "libdatachannel", + "features": [ + "srtp", + "ws" + ] + }, + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |