Skip to content

Commit

Permalink
[etcd-cpp-apiv3] fix find cpprestsdk when build core only (#43427)
Browse files Browse the repository at this point in the history
  • Loading branch information
waruto210 authored Feb 4, 2025
1 parent d80311e commit 3cf004d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
19 changes: 19 additions & 0 deletions ports/etcd-cpp-apiv3/fix-find-cpprestsdk.patch
Original file line number Diff line number Diff line change
@@ -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}/../../..")
1 change: 1 addition & 0 deletions ports/etcd-cpp-apiv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
"${GRPC_PATCH}"
fix-find-cpprestsdk.patch
)
file(WRITE "${SOURCE_PATH}/cmake/UploadPPA.cmake" "")

Expand Down
2 changes: 1 addition & 1 deletion ports/etcd-cpp-apiv3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@
},
"etcd-cpp-apiv3": {
"baseline": "0.15.4",
"port-version": 2
"port-version": 3
},
"etl": {
"baseline": "20.39.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/etcd-cpp-apiv3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "294ed70c0aa28d439d90290e0b4eb2a4ba4bf4c5",
"version": "0.15.4",
"port-version": 3
},
{
"git-tree": "cae8fca4e862441e5fc85b5955988e41ea70f66e",
"version": "0.15.4",
Expand Down

0 comments on commit 3cf004d

Please sign in to comment.