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

[vcpkg baseline][google-cloud-cpp] Fix googleapis download #43781

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
37 changes: 37 additions & 0 deletions ports/google-cloud-cpp/fix-googleapis-download.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt
index 5e93f522..30132c06 100644
--- a/external/googleapis/CMakeLists.txt
+++ b/external/googleapis/CMakeLists.txt
@@ -114,7 +114,7 @@ include(GoogleCloudCppCommonOptions)
# the generated libraries. The Conan packages (https://conan.io), will need to
# patch this value. Setting the value in a single place makes such patching
# easier.
-set(EXTERNAL_GOOGLEAPIS_PREFIX "${PROJECT_BINARY_DIR}/external/googleapis")
+set(EXTERNAL_GOOGLEAPIS_PREFIX "${CMAKE_SOURCE_DIR}/external/googleapis")
set(EXTERNAL_GOOGLEAPIS_SOURCE
"${EXTERNAL_GOOGLEAPIS_PREFIX}/src/googleapis_download"
PARENT_SCOPE)
@@ -138,6 +138,7 @@ foreach (file IN LISTS protolists)
endforeach ()
endforeach ()

+if(0)
include(ExternalProject)

externalproject_add(
@@ -163,6 +164,7 @@ externalproject_add(
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${EXTERNAL_GOOGLEAPIS_BYPRODUCTS}
LOG_DOWNLOAD OFF)
+endif()

google_cloud_cpp_find_proto_include_dir(PROTO_INCLUDE_DIR)

@@ -204,7 +206,6 @@ function (external_googleapis_add_library proto)
endfunction ()

function (external_googleapis_set_version_and_alias short_name)
- add_dependencies("google_cloud_cpp_${short_name}" googleapis_download)
set_target_properties(
"google_cloud_cpp_${short_name}"
PROPERTIES EXPORT_NAME google-cloud-cpp::${short_name}
16 changes: 16 additions & 0 deletions ports/google-cloud-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,24 @@ vcpkg_from_github(
REF "v${VERSION}"
SHA512 889afa01c67b2a6566bfd557a3a1990806888b967e7383d9fd8b67aff93ed1430e463715f0ba44f178d4ac241f08c08b2973f83b3c5e6e53e7c634a63e39d3ef
HEAD_REF main
PATCHES fix-googleapis-download.patch
)

# On update, update REF according to $/cmake/GoogleapisConfig.cmake 's
# set(_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH_GOOGLEAPIS
REPO googleapis/googleapis
REF 280725e991516d4a0f136268faf5aa6d32d21b54
SHA512 80da8175c52ae83eaa300783377d9f3d86593fa0bcd4723c5afea4cafa8bf4a2575fb2af48f7e944eabdb11ec8c946a14d9d75f70384744a3bfb2cc71ec2b1ed
HEAD_REF master
)

if(NOT EXISTS "${SOURCE_PATH}/external/googleapis/src")
file(MAKE_DIRECTORY "${SOURCE_PATH}/external/googleapis/src")
file(RENAME "${SOURCE_PATH_GOOGLEAPIS}" "${SOURCE_PATH}/external/googleapis/src/googleapis_download")
endif()

if ("grpc-common" IN_LIST FEATURES)
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")
endif ()
Expand Down
1 change: 1 addition & 0 deletions ports/google-cloud-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "google-cloud-cpp",
"version": "2.35.0",
"port-version": 1,
"description": "C++ Client Libraries for Google Cloud Platform APIs.",
"homepage": "https://github.com/googleapis/google-cloud-cpp",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@
},
"google-cloud-cpp": {
"baseline": "2.35.0",
"port-version": 0
"port-version": 1
},
"google-cloud-cpp-common": {
"baseline": "alias",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/google-cloud-cpp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b30c7f31e3ce20a6197872665bc9939b7d2a95a2",
"version": "2.35.0",
"port-version": 1
},
{
"git-tree": "e5e364d9a30671192bff0f92134f30a7abccb0f1",
"version": "2.35.0",
Expand Down