Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Webthing-CPP] add new port #41669

Merged
merged 10 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions ports/webthing-cpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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}
OPTIONS -DWT_BUILD_EXAMPLES=OFF
OPTIONS -DWT_BUILD_TESTS=OFF
bw-hro marked this conversation as resolved.
Show resolved Hide resolved
)

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}")
bw-hro marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions ports/webthing-cpp/usage
Original file line number Diff line number Diff line change
@@ -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})
30 changes: 30 additions & 0 deletions ports/webthing-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9528,6 +9528,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
Expand Down
9 changes: 9 additions & 0 deletions versions/w-/webthing-cpp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "c838c98ea32e3ec4167a2a83d51c2a9e3d5db498",
"version": "1.0.5",
"port-version": 0
}
]
}