diff --git a/cmake/GoogleCloudCppFeatures.cmake b/cmake/GoogleCloudCppFeatures.cmake index 40f0a00893418..2360cdbf67f33 100644 --- a/cmake/GoogleCloudCppFeatures.cmake +++ b/cmake/GoogleCloudCppFeatures.cmake @@ -401,9 +401,6 @@ function (google_cloud_cpp_enable_features) if (NOT ("storage" IN_LIST GOOGLE_CLOUD_CPP_ENABLE)) add_subdirectory(google/cloud/storage) endif () - elseif ("${feature}" STREQUAL "storage") - add_subdirectory(protos/google/cloud/storage/tests) - add_subdirectory(google/cloud/storage) elseif ("${feature}" STREQUAL "experimental-bigquery_rest") if (NOT ("bigquery" IN_LIST GOOGLE_CLOUD_CPP_ENABLE)) add_subdirectory(google/cloud/bigquery) @@ -431,6 +428,13 @@ function (google_cloud_cpp_enable_features) ) continue() endif () + if (IS_DIRECTORY + "${PROJECT_SOURCE_DIR}/protos/google/cloud/${feature}" + AND EXISTS + "${PROJECT_SOURCE_DIR}/protos/google/cloud/${feature}/CMakeLists.txt" + ) + add_subdirectory(protos/google/cloud/${feature}) + endif () add_subdirectory(google/cloud/${feature}) if (GOOGLE_CLOUD_CPP_ENABLE_EXAMPLES AND IS_DIRECTORY diff --git a/protos/google/cloud/storage/CMakeLists.txt b/protos/google/cloud/storage/CMakeLists.txt new file mode 100644 index 0000000000000..9b320e6d52840 --- /dev/null +++ b/protos/google/cloud/storage/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +add_subdirectory(tests)