aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/rest-rpc
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/rest-rpc')
-rw-r--r--vcpkg/ports/rest-rpc/portfile.cmake21
-rw-r--r--vcpkg/ports/rest-rpc/unofficial-rest-rpc-config.cmake14
-rw-r--r--vcpkg/ports/rest-rpc/vcpkg.json11
3 files changed, 46 insertions, 0 deletions
diff --git a/vcpkg/ports/rest-rpc/portfile.cmake b/vcpkg/ports/rest-rpc/portfile.cmake
new file mode 100644
index 0000000..bc96531
--- /dev/null
+++ b/vcpkg/ports/rest-rpc/portfile.cmake
@@ -0,0 +1,21 @@
+# header-only library
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO qicosmos/rest_rpc
+ REF "v${VERSION}"
+ SHA512 1d88085acc6c4f913901631725acd08a688a079878677d064d441c3c89167275c5eed371d24e370feb88879ac06270e9316b91c67ea41e350523fe670406ecc1
+ HEAD_REF master
+)
+
+file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/include/rest_rpc.hpp"
+ "#include \"rest_rpc/rpc_server.h\""
+ "#define ASIO_STANDALONE\n#include \"rest_rpc/rpc_server.h\""
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-rest-rpc-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-rest-rpc-config")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/rest-rpc/unofficial-rest-rpc-config.cmake b/vcpkg/ports/rest-rpc/unofficial-rest-rpc-config.cmake
new file mode 100644
index 0000000..7604094
--- /dev/null
+++ b/vcpkg/ports/rest-rpc/unofficial-rest-rpc-config.cmake
@@ -0,0 +1,14 @@
+include(CMakeFindDependencyMacro)
+find_dependency(asio CONFIG)
+find_dependency(msgpack-cxx CONFIG)
+
+get_filename_component(vcpkg_rest_rpc_prefix_path "${CMAKE_CURRENT_LIST_DIR}" PATH)
+get_filename_component(vcpkg_rest_rpc_prefix_path "${vcpkg_rest_rpc_prefix_path}" PATH)
+
+if(NOT TARGET unofficial::rest-rpc::rest-rpc)
+ add_library(unofficial::rest-rpc::rest-rpc INTERFACE IMPORTED)
+ target_include_directories(unofficial::rest-rpc::rest-rpc INTERFACE "${vcpkg_rest_rpc_prefix_path}/include")
+ target_link_libraries(unofficial::rest-rpc::rest-rpc INTERFACE asio::asio msgpack-cxx)
+endif()
+
+unset(vcpkg_rest_rpc_prefix_path)
diff --git a/vcpkg/ports/rest-rpc/vcpkg.json b/vcpkg/ports/rest-rpc/vcpkg.json
new file mode 100644
index 0000000..9c79425
--- /dev/null
+++ b/vcpkg/ports/rest-rpc/vcpkg.json
@@ -0,0 +1,11 @@
+{
+ "name": "rest-rpc",
+ "version": "0.12",
+ "port-version": 1,
+ "description": "c++11, high performance, cross platform, easy to use rpc framework",
+ "homepage": "https://github.com/qicosmos/rest_rpc",
+ "dependencies": [
+ "asio",
+ "msgpack"
+ ]
+}