[rest-rpc]add new port (#13232)

This commit is contained in:
leap 2020-09-01 00:25:21 +08:00 committed by GitHub
parent 75d1ba664f
commit 51d3fb052d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

5
ports/rest-rpc/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: rest-rpc
Version: 0.07
Homepage: https://github.com/qicosmos/rest_rpc
Description: c++11, high performance, cross platform, easy to use rpc framework
Build-Depends: asio

View File

@ -0,0 +1,25 @@
# header-only library
set(RESTRPC_VERSION V0.07)
set(RESTRPC_HASH 148152776c8c4f16e404c62ab3f46618e1817c0b4b186dbcc399c859efd110ed5a207bf56e961c312f80844f696f597068e0abc00e426409d50a2889d30c6d8e)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rest-rpc-${RESTRPC_VERSION})
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO qicosmos/rest_rpc
REF ${RESTRPC_VERSION}
SHA512 ${RESTRPC_HASH}
HEAD_REF master
)
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL ${SOURCE_PATH}/third/msgpack/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\""
)
# # Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)