[etcd-cpp-apiv3] fix find cpprestsdk when build core only (#43427)

This commit is contained in:
waruto 2025-02-04 14:21:05 +08:00 committed by GitHub
parent d80311e762
commit 3cf004dd2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,19 @@
diff --git a/etcd-cpp-api-config.in.cmake b/etcd-cpp-api-config.in.cmake
index c1a9047..c12b748 100644
--- a/etcd-cpp-api-config.in.cmake
+++ b/etcd-cpp-api-config.in.cmake
@@ -15,9 +15,11 @@ if(NOT gRPC_FOUND)
find_dependency(GRPC)
endif()
-find_dependency(cpprestsdk)
-if(cpprestsdk_FOUND)
- set(CPPREST_LIB cpprestsdk::cpprest)
+if (NOT @BUILD_ETCD_CORE_ONLY@)
+ find_dependency(cpprestsdk)
+ if(cpprestsdk_FOUND)
+ set(CPPREST_LIB cpprestsdk::cpprest)
+ endif()
endif()
set(ETCD_CPP_HOME "${CMAKE_CURRENT_LIST_DIR}/../../..")

View File

@ -13,6 +13,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
"${GRPC_PATCH}"
fix-find-cpprestsdk.patch
)
file(WRITE "${SOURCE_PATH}/cmake/UploadPPA.cmake" "")

View File

@ -1,7 +1,7 @@
{
"name": "etcd-cpp-apiv3",
"version": "0.15.4",
"port-version": 2,
"port-version": 3,
"description": "The etcd-cpp-apiv3 is a C++ API for etcd's v3 client API, i.e., ETCDCTL_API=3.",
"homepage": "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3",
"license": "BSD-3-Clause",

View File

@ -2590,7 +2590,7 @@
},
"etcd-cpp-apiv3": {
"baseline": "0.15.4",
"port-version": 2
"port-version": 3
},
"etl": {
"baseline": "20.39.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "294ed70c0aa28d439d90290e0b4eb2a4ba4bf4c5",
"version": "0.15.4",
"port-version": 3
},
{
"git-tree": "cae8fca4e862441e5fc85b5955988e41ea70f66e",
"version": "0.15.4",