[restbed] Fix usage (#30021)

This commit is contained in:
Kai Pastor 2023-03-06 21:08:16 +01:00 committed by GitHub
parent 13003d8cf7
commit 8cd85cb456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 5 deletions

View File

@ -54,7 +54,7 @@ index e6095da..6bf8d81 100644
if ( BUILD_TESTS )
find_package( catch REQUIRED )
@@ -119,5 +133,21 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" )
@@ -119,5 +133,26 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" )
install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" )
install( FILES ${ARTIFACTS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/corvusoft/${PROJECT_NAME}" )
@ -74,6 +74,11 @@ index e6095da..6bf8d81 100644
+ find_dependency(OpenSSL)
+endif()
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-restbed-target.cmake")
+if("@BUILD_SHARED_LIBS@")
+ add_library(unofficial::restbed::restbed ALIAS unofficial::restbed::restbed-shared)
+else()
+ add_library(unofficial::restbed::restbed ALIAS unofficial::restbed::restbed-static)
+endif()
+]])
+
+configure_file( "${CMAKE_CURRENT_BINARY_DIR}/unofficial-restbed-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/unofficial-restbed-config.cmake" @ONLY)

View File

@ -26,9 +26,8 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-restbed)
# Remove include debug files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# Handle copyright
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

4
ports/restbed/usage Normal file
View File

@ -0,0 +1,4 @@
restbed provides CMake targets:
find_package(unofficial-restbed CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::restbed::restbed)

View File

@ -1,7 +1,7 @@
{
"name": "restbed",
"version": "4.8",
"port-version": 1,
"port-version": 2,
"description": "Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.",
"homepage": "https://github.com/corvusoft/restbed",
"license": "AGPL-3.0-or-later OR CPL-1.0",

View File

@ -6857,7 +6857,7 @@
},
"restbed": {
"baseline": "4.8",
"port-version": 1
"port-version": 2
},
"restc-cpp": {
"baseline": "0.10.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c41ea5f5396b24a4566efaea78d996fcbc2c4ec2",
"version": "4.8",
"port-version": 2
},
{
"git-tree": "17ada73eb1e860f2e1ac3b1dd9769ba3115dea29",
"version": "4.8",