mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[curve-coco] add new port (#49137)
This commit is contained in:
29
ports/curve-coco/portfile.cmake
Normal file
29
ports/curve-coco/portfile.cmake
Normal file
@@ -0,0 +1,29 @@
|
||||
set(VCPKG_BUILD_TYPE release) # Header-only library
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Curve/coco
|
||||
REF "v${VERSION}"
|
||||
SHA512 7c011553834dba0030ad01d45fcdd3b092ca1b30ccb6f500bbc3e53ed5ee3c0eb57a581347f9879e5b3746cdc3e3214d41329a6ef04988c64c9f55350d8948a3
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
remove-cpm.patch
|
||||
)
|
||||
|
||||
# Replace CPM and download PackageProject directly to avoid issues with FETCHCONTENT_FULLY_DISCONNECTED
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PACKAGE_PROJECT_PATH
|
||||
REPO TheLartians/PackageProject.cmake
|
||||
REF "v1.13.0"
|
||||
SHA512 3cf0523bddc213f206ed0ca57803550cb7db9e293392d3741138be47f49d9027ef517e1656235a349a62b492d35c3fc677714dc00afe59e2d36144a9689cfa8f
|
||||
HEAD_REF master
|
||||
)
|
||||
file(RENAME "${PACKAGE_PROJECT_PATH}" "${SOURCE_PATH}/cmake/packageproject.cmake")
|
||||
|
||||
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/coco-${VERSION}" PACKAGE_NAME "coco")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") # from CMake config
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|
||||
27
ports/curve-coco/remove-cpm.patch
Normal file
27
ports/curve-coco/remove-cpm.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3a2434c..ae2b342 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -13,7 +13,6 @@ option(coco_exceptions "Enable exception support (Respects -fno-exceptions even
|
||||
# +-------------------------------------------------------------------------------------------------------+
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC "src/latch.cpp" "src/stray.cpp")
|
||||
-add_library(cr::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20 CXX_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON)
|
||||
@@ -50,13 +49,7 @@ endif()
|
||||
# | Package Config |
|
||||
# +-------------------------------------------------------------------------------------------------------+
|
||||
|
||||
-include("cmake/cpm.cmake")
|
||||
-
|
||||
-CPMFindPackage(
|
||||
- NAME PackageProject
|
||||
- VERSION 1.13.0
|
||||
- GIT_REPOSITORY "https://github.com/TheLartians/PackageProject.cmake"
|
||||
-)
|
||||
+add_subdirectory(cmake/packageproject.cmake)
|
||||
|
||||
packageProject(
|
||||
NAMESPACE cr
|
||||
17
ports/curve-coco/vcpkg.json
Normal file
17
ports/curve-coco/vcpkg.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "curve-coco",
|
||||
"version": "4.3.0",
|
||||
"description": "a C++20 coroutine library that aims to be convenient and simple to use.",
|
||||
"homepage": "https://github.com/Curve/coco",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2268,6 +2268,10 @@
|
||||
"baseline": "2018-06-15",
|
||||
"port-version": 11
|
||||
},
|
||||
"curve-coco": {
|
||||
"baseline": "4.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"cute-headers": {
|
||||
"baseline": "2019-09-20",
|
||||
"port-version": 2
|
||||
|
||||
9
versions/c-/curve-coco.json
Normal file
9
versions/c-/curve-coco.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "428adea8bb4f40ac5b13d1331ea8e5a6a7d9abb9",
|
||||
"version": "4.3.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user