[continuable] add a new port (#16261)

* [continuable] add a new port

* todo: create a patch for `find_package(function2)`

* [continuable] add patch to edit cmakelists

* [continuable] add port SHA

* [continuable] minimize patch

* update port SHA
This commit is contained in:
Park DongHa 2021-02-20 06:02:46 +09:00 committed by GitHub
parent 82dac26950
commit eb1ba2a113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,55 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,13 +23,6 @@ cmake_minimum_required(VERSION 3.11)
project(continuable VERSION 4.0.0 LANGUAGES C CXX)
-if (CTI_CONTINUABLE_IS_FIND_INCLUDED)
- set(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT OFF)
-else()
- string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
- CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT)
-endif()
-
option(CTI_CONTINUABLE_WITH_INSTALL
"Add the continuable install targets"
${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT})
@@ -80,7 +73,7 @@ if(NOT TARGET Threads::Threads)
find_package(Threads REQUIRED)
endif()
-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT)
+if (FALSE)
include(cmake/CMakeLists.txt)
add_subdirectory(dep)
else()
@@ -90,7 +83,7 @@ else()
endif()
# continuable-base
-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT)
+if (TRUE)
add_library(continuable-base INTERFACE)
else()
add_library(continuable-base INTERFACE IMPORTED GLOBAL)
@@ -146,7 +139,7 @@ if (CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS)
CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS)
endif()
-if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT)
+if (TRUE)
add_library(continuable INTERFACE)
else()
add_library(continuable INTERFACE IMPORTED GLOBAL)
@@ -168,8 +161,8 @@ if (CTI_CONTINUABLE_WITH_INSTALL)
# Headers and license files
install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/continuable"
DESTINATION "include")
- install(FILES "LICENSE.txt" DESTINATION .)
- install(FILES "Readme.md" DESTINATION .)
+ install(FILES "LICENSE.txt" DESTINATION share/${PROJECT_NAME} RENAME copyright)
+ install(FILES "Readme.md" DESTINATION share/${PROJECT_NAME})
# Config.cmake
write_basic_package_version_file(

View File

@ -0,0 +1,30 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Naios/continuable
REF 4.1.0
SHA512 b80b1c13b068382553b727fd3b346323e2051b1c92237efa151ba8ec92b6d722ca993ae4bbf0e6e308a92834ae92011a179e74fcf713a09beaa48676f7d08340
HEAD_REF master
PATCHES
fix-cmakelists.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCTI_CONTINUABLE_WITH_INSTALL=ON
-DCTI_CONTINUABLE_WITH_TESTS=OFF
-DCTI_CONTINUABLE_WITH_EXAMPLES=OFF
-DCTI_CONTINUABLE_WITH_BENCHMARKS=OFF
-DCTI_CONTINUABLE_WITH_NO_EXCEPTIONS=OFF
-DCTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS=ON
-DCTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE=ON
-DCTI_CONTINUABLE_WITH_CPP_LATEST=ON # requires cxx_std_17
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib
${CURRENT_PACKAGES_DIR}/debug
)

View File

@ -0,0 +1,9 @@
{
"name": "continuable",
"version-string": "4.1.0",
"description": "C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)",
"homepage": "https://naios.github.io/continuable/",
"dependencies": [
"function2"
]
}

View File

@ -1324,6 +1324,10 @@
"baseline": "2020-08-09",
"port-version": 0
},
"continuable": {
"baseline": "4.1.0",
"port-version": 0
},
"coolprop": {
"baseline": "6.4.1",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "d014250505dde9759c6e46aa6825115bfdd5a15c",
"version-string": "4.1.0",
"port-version": 0
}
]
}