Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/etcd-cpp-apiv3/fix-find-cpprestsdk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/etcd-cpp-api-config.in.cmake b/etcd-cpp-api-config.in.cmake
index c1a9047..23bf32f 100644
--- a/etcd-cpp-api-config.in.cmake
+++ b/etcd-cpp-api-config.in.cmake
@@ -15,7 +15,7 @@ if(NOT gRPC_FOUND)
find_dependency(GRPC)
endif()

-find_dependency(cpprestsdk)
+find_package(cpprestsdk QUIET)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the incorrect fix. Instead, the patch should only call find_dependency when the async feature is enabled.

if (NOT @BUILD_ETCD_CORE_ONLY@)
  find_dependency(cpprestsdk)
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the reminder

if(cpprestsdk_FOUND)
set(CPPREST_LIB cpprestsdk::cpprest)
endif()
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": "95aa773ba06195fe1f287efb2fa96c9f82f48ab7",
"version": "0.15.4",
"port-version": 3
},
{
"git-tree": "cae8fca4e862441e5fc85b5955988e41ea70f66e",
"version": "0.15.4",
Expand Down