aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/restinio
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/restinio')
-rw-r--r--vcpkg/ports/restinio/portfile.cmake29
-rw-r--r--vcpkg/ports/restinio/restinio_cmake_file.patch14
-rw-r--r--vcpkg/ports/restinio/vcpkg.json21
3 files changed, 64 insertions, 0 deletions
diff --git a/vcpkg/ports/restinio/portfile.cmake b/vcpkg/ports/restinio/portfile.cmake
new file mode 100644
index 0000000..bb73c14
--- /dev/null
+++ b/vcpkg/ports/restinio/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO stiffstream/restinio
+ REF "v${VERSION}"
+ SHA512 66b1b2109258179685e2daa7f08d6684c2900a65a7e427e2c9ff7671571eafff102d19da7c1a9ac76cefa21d5cfce66b88ea0ed0ee4be614392e6fccb6d07bf4
+ PATCHES "restinio_cmake_file.patch"
+)
+
+set(VCPKG_BUILD_TYPE release) # header-only
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/dev"
+ OPTIONS
+ -DRESTINIO_INSTALL=ON
+ -DRESTINIO_TEST=OFF
+ -DRESTINIO_SAMPLE=OFF
+ -DRESTINIO_BENCHMARK=OFF
+ -DRESTINIO_WITH_SOBJECTIZER=OFF
+ -DRESTINIO_ASIO_SOURCE=standalone
+ -DRESTINIO_DEP_STANDALONE_ASIO=find
+ -DRESTINIO_DEP_LLHTTP=find
+ -DRESTINIO_DEP_FMT=find
+ -DRESTINIO_DEP_EXPECTED_LITE=find
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/restinio)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+
diff --git a/vcpkg/ports/restinio/restinio_cmake_file.patch b/vcpkg/ports/restinio/restinio_cmake_file.patch
new file mode 100644
index 0000000..978d119
--- /dev/null
+++ b/vcpkg/ports/restinio/restinio_cmake_file.patch
@@ -0,0 +1,14 @@
+diff --git a/dev/restinio/CMakeLists.txt b/dev/restinio/CMakeLists.txt
+index 4a5b4803..f622a87d 100644
+--- a/dev/restinio/CMakeLists.txt
++++ b/dev/restinio/CMakeLists.txt
+@@ -1,6 +1,8 @@
+ cmake_minimum_required(VERSION 3.10)
+
+-cmake_policy(SET CMP0177 NEW)
++if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0")
++ cmake_policy(SET CMP0177 NEW)
++endif()
+
+ if(NOT RESTINIO_LIBRARY_NAME)
+ # That must be the case when RESTinio is used as a dependency.
diff --git a/vcpkg/ports/restinio/vcpkg.json b/vcpkg/ports/restinio/vcpkg.json
new file mode 100644
index 0000000..0d394ee
--- /dev/null
+++ b/vcpkg/ports/restinio/vcpkg.json
@@ -0,0 +1,21 @@
+{
+ "name": "restinio",
+ "version": "0.7.8",
+ "description": "A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests.",
+ "homepage": "https://github.com/Stiffstream/restinio",
+ "license": "BSD-3-Clause",
+ "dependencies": [
+ "asio",
+ "expected-lite",
+ "fmt",
+ "llhttp",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}