diff options
| author | Carlos O'Ryan <coryan@google.com> | 2021-10-05 19:03:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-05 16:03:03 -0700 |
| commit | 1b8c00cf98afc5bf964ab5a1430522f191237abb (patch) | |
| tree | f4a7a5c1a2f123eb1931b569db276c8e3354d74e /ports/google-cloud-cpp | |
| parent | 8960971a0ac1f14f63f8d6420b4e09e54be17f1d (diff) | |
| download | vcpkg-1b8c00cf98afc5bf964ab5a1430522f191237abb.tar.gz vcpkg-1b8c00cf98afc5bf964ab5a1430522f191237abb.zip | |
[google-cloud-cpp] migrate to vcpkg_cmake_config_fixup() (#20521)
* [google-cloud-cpp] migrate to vcpkg_cmake_config_fixup()
* Address review comments
Diffstat (limited to 'ports/google-cloud-cpp')
| -rw-r--r-- | ports/google-cloud-cpp/portfile.cmake | 45 | ||||
| -rw-r--r-- | ports/google-cloud-cpp/vcpkg.json | 5 |
2 files changed, 48 insertions, 2 deletions
diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 06ff7860a..cc29525cc 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -31,9 +31,50 @@ vcpkg_cmake_configure( vcpkg_cmake_install() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +foreach(feature IN LISTS FEATURES) + set(config_path "lib/cmake/google_cloud_cpp_${feature}") + # Most features get their own package in `google-cloud-cpp`. + # The exceptions are captured by this `if()` command, basically + # things like `core` and `experimental-storage-grpc` are skipped. + if(NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/${config_path}") + continue() + endif() + vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${feature}" + CONFIG_PATH "${config_path}" + DO_NOT_DELETE_PARENT_CONFIG_PATH) +endforeach() +# These packages are automatically installed depending on what features are +# enabled. +foreach(suffix common googleapis grpc_utils) + set(config_path "lib/cmake/google_cloud_cpp_${suffix}") + if(NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/${config_path}") + continue() + endif() + vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${suffix}" + CONFIG_PATH "${config_path}" + DO_NOT_DELETE_PARENT_CONFIG_PATH) +endforeach() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +# These packages are only for backwards compability. The google-cloud-cpp team +# is planning to remove them around 2022-02-15. +foreach(package + googleapis + bigtable_client + pubsub_client + spanner_client + storage_client) + set(config_path "lib/cmake/google_cloud_cpp_${suffix}") + if(NOT IS_DIRECTORY "${config_path}") + continue() + endif() + vcpkg_cmake_config_fixup(PACKAGE_NAME "${package}" + CONFIG_PATH "${config_path}" + DO_NOT_DELETE_PARENT_CONFIG_PATH) +endforeach() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" + "${CURRENT_PACKAGES_DIR}/debug/lib/cmake" + "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/google-cloud-cpp/vcpkg.json b/ports/google-cloud-cpp/vcpkg.json index 35cbf153b..5b3f62ef4 100644 --- a/ports/google-cloud-cpp/vcpkg.json +++ b/ports/google-cloud-cpp/vcpkg.json @@ -1,6 +1,7 @@ { "name": "google-cloud-cpp", "version": "1.32.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", @@ -10,6 +11,10 @@ { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ], "default-features": [ |
