mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[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:
parent
82dac26950
commit
eb1ba2a113
55
ports/continuable/fix-cmakelists.patch
Normal file
55
ports/continuable/fix-cmakelists.patch
Normal 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(
|
30
ports/continuable/portfile.cmake
Normal file
30
ports/continuable/portfile.cmake
Normal 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
|
||||
)
|
9
ports/continuable/vcpkg.json
Normal file
9
ports/continuable/vcpkg.json
Normal 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"
|
||||
]
|
||||
}
|
@ -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
|
||||
|
9
versions/c-/continuable.json
Normal file
9
versions/c-/continuable.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d014250505dde9759c6e46aa6825115bfdd5a15c",
|
||||
"version-string": "4.1.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user