@@ -4,7 +4,7 @@ vcpkg_from_github(
4
4
OUT_SOURCE_PATH SOURCE_PATH
5
5
REPO googleapis/google-cloud-cpp
6
6
REF "v${VERSION} "
7
- SHA512 f017252b3fbccd5b91088a00c98a610606c5e98b920bf6c0889b6bf0f33f923c38a6116df7d9784381fd6b81ff4c303f55a609fde2e7182958a3c9cbab1f9f47
7
+ SHA512 f02e26964a4049791bf4ce9580e738f245fb8380f9a1ccf3bd193296a4877aece72e8507efbbcabf7ef7072a810f6632c399748d804e33f3cc769ef49e334a88
8
8
HEAD_REF main
9
9
PATCHES
10
10
support_absl_cxx17.patch
@@ -53,28 +53,27 @@ vcpkg_cmake_configure(
53
53
vcpkg_cmake_install()
54
54
55
55
file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /debug/include" )
56
- foreach (feature IN LISTS FEATURES)
57
- set (config_path "lib/cmake/google_cloud_cpp_${feature} " )
58
- # Most features get their own package in `google-cloud-cpp`.
59
- # The exceptions are captured by this `if()` command, basically
60
- # things like `core` and `experimental-storage-grpc` are skipped.
56
+
57
+ function (google_cloud_cpp_cmake_config_fixup library)
58
+ set (config_path "lib/cmake/google_cloud_cpp_${library} " )
59
+ # If the library exists and is installed, tell vcpkg about it.
61
60
if (NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR} /${config_path} " )
62
- continue ()
61
+ return ()
63
62
endif ()
64
- vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${feature } "
63
+ vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${library } "
65
64
CONFIG_PATH "${config_path} "
66
65
DO_NOT_DELETE_PARENT_CONFIG_PATH)
66
+ endfunction ()
67
+
68
+ foreach (feature IN LISTS GOOGLE_CLOUD_CPP_ENABLE)
69
+ google_cloud_cpp_cmake_config_fixup(${feature} )
70
+ google_cloud_cpp_cmake_config_fixup(${feature} _mocks)
67
71
endforeach ()
72
+
68
73
# These packages are automatically installed depending on what features are
69
74
# enabled.
70
- foreach (suffix common compute_protos googleapis grpc_utils iam_v2 logging_type rest_internal rest_protobuf_internal dialogflow_cx dialogflow_es)
71
- set (config_path "lib/cmake/google_cloud_cpp_${suffix} " )
72
- if (NOT IS_DIRECTORY "${CURRENT_PACKAGES_DIR} /${config_path} " )
73
- continue ()
74
- endif ()
75
- vcpkg_cmake_config_fixup(PACKAGE_NAME "google_cloud_cpp_${suffix} "
76
- CONFIG_PATH "${config_path} "
77
- DO_NOT_DELETE_PARENT_CONFIG_PATH)
75
+ foreach (feature common compute_protos googleapis grpc_utils iam_v2 logging_type rest_internal rest_protobuf_internal)
76
+ google_cloud_cpp_cmake_config_fixup(${feature} )
78
77
endforeach ()
79
78
80
79
file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /lib/cmake"
0 commit comments