forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[asio,rest-rpc] Update asio, de-vendor msgpack from rest-rpc, test po…
…rt (microsoft#41772)
- Loading branch information
Showing
16 changed files
with
98 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
include ("${CMAKE_CURRENT_LIST_DIR}/asio-targets.cmake") | ||
find_package(Threads) | ||
|
||
if(NOT TARGET asio::asio) | ||
add_library(asio::asio INTERFACE IMPORTED) | ||
target_link_libraries(asio::asio INTERFACE asio) | ||
include("${CMAKE_CURRENT_LIST_DIR}/asio-targets.cmake") | ||
|
||
if(NOT TARGET asio) | ||
add_library(asio ALIAS asio::asio) | ||
endif() | ||
|
||
get_target_property(_ASIO_INCLUDE_DIR asio INTERFACE_INCLUDE_DIRECTORIES) | ||
set(ASIO_INCLUDE_DIR "${_ASIO_INCLUDE_DIR}") | ||
get_target_property(ASIO_INCLUDE_DIR asio::asio INTERFACE_INCLUDE_DIRECTORIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
#header-only library | ||
set(VCPKG_BUILD_TYPE release) # header-only | ||
|
||
string(REPLACE "." "-" ref "asio-${VERSION}") | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO chriskohlhoff/asio | ||
REF asio-1-31-0 | ||
SHA512 505c3f4e4043cd73be1a28ab611d7f61046d6b60f80c08aaceea892a76ce7f51056d39516d7b4e836611a9974c227de52c0434122af0ea8539ceb57363a82b62 | ||
REF "${ref}" | ||
SHA512 9374ff97bd4af7b5b41754970b2bcb468f450fee46a80c9c3344f732c64091f2ac5a73ebf4ac1831c623793c08a3c109ae90b601273c40d062bfd4f026f1d94d | ||
HEAD_REF master | ||
) | ||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") | ||
|
||
# Always use "ASIO_STANDALONE" to avoid boost dependency | ||
vcpkg_replace_string("${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)") | ||
|
||
# CMake install | ||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DPACKAGE_VERSION=${VERSION} | ||
) | ||
vcpkg_cmake_install() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_cmake_config_fixup() | ||
file(INSTALL | ||
"${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" | ||
) | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
|
||
# Handle copyright | ||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/asio/LICENSE_1_0.txt") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +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" | ||
"asio", | ||
"msgpack" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
|
||
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project") | ||
vcpkg_cmake_build() |
11 changes: 11 additions & 0 deletions
11
scripts/test_ports/vcpkg-ci-rest-rpc/project/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.7) | ||
project(soci-test CXX) | ||
|
||
if(APPLE) | ||
set(CMAKE_CXX_STANDARD 11) | ||
endif() | ||
|
||
add_executable(main main.cpp) | ||
|
||
find_package(unofficial-rest-rpc CONFIG REQUIRED) | ||
target_link_libraries(main unofficial::rest-rpc::rest-rpc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <rest_rpc.hpp> | ||
|
||
int main() | ||
{ | ||
rest_rpc::rpc_client client("127.0.0.1", 8080); | ||
client.connect(); | ||
client.run(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "vcpkg-ci-rest-rpc", | ||
"version-string": "ci", | ||
"description": "Validates rest-rpc", | ||
"dependencies": [ | ||
"rest-rpc", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters