diff --git a/ports/webthing-cpp/portfile.cmake b/ports/webthing-cpp/portfile.cmake new file mode 100644 index 0000000000..49d7367d99 --- /dev/null +++ b/ports/webthing-cpp/portfile.cmake @@ -0,0 +1,28 @@ +set(VCPKG_BUILD_TYPE release) # header-only + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bw-hro/webthing-cpp + REF "v${VERSION}" + SHA512 a4df3424721542ea4a7951ffc643905d31d906bcf87bed613b422ba8c0babb406f842459ba6c6df73c332c70c6fdd639413dc42272fd3b27fdf96b2cee528d36 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + ssl WT_WITH_SSL +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DWT_BUILD_EXAMPLES=OFF + -DWT_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/webthing-cpp/usage b/ports/webthing-cpp/usage new file mode 100644 index 0000000000..5e4ea63d3e --- /dev/null +++ b/ports/webthing-cpp/usage @@ -0,0 +1,5 @@ + +webthing-cpp is header-only and can be used from CMake via: + + find_path(WEBTHING_CPP_INCLUDE_DIRS "bw/webthing/webthing.hpp") + target_include_directories(main PRIVATE ${WEBTHING_CPP_INCLUDE_DIRS}) diff --git a/ports/webthing-cpp/vcpkg.json b/ports/webthing-cpp/vcpkg.json new file mode 100644 index 0000000000..50b966a0aa --- /dev/null +++ b/ports/webthing-cpp/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "webthing-cpp", + "version": "1.0.5", + "description": "Webthing-CPP is a modern CPP/C++17 implementation of the WebThings API.", + "homepage": "https://github.com/bw-hro/webthing-cpp", + "license": "MIT", + "dependencies": [ + "json-schema-validator", + "mdns", + "nlohmann-json", + "uwebsockets", + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "ssl": { + "description": "Support HTTPS via uwebsockets", + "dependencies": [ + { + "name": "usockets", + "features": [ + "ssl" + ] + } + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 16f19f1d3f..10e582131b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9536,6 +9536,10 @@ "baseline": "0.8.2", "port-version": 3 }, + "webthing-cpp": { + "baseline": "1.0.5", + "port-version": 0 + }, "webview2": { "baseline": "1.0.2277.86", "port-version": 0 diff --git a/versions/w-/webthing-cpp.json b/versions/w-/webthing-cpp.json new file mode 100644 index 0000000000..a2f50a6f7e --- /dev/null +++ b/versions/w-/webthing-cpp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "478564ecb6732d9d2f6dde40ca8ff122f6dabe00", + "version": "1.0.5", + "port-version": 0 + } + ] +}