@@ -18,10 +18,22 @@ include(GoogleapisConfig)
1818set (DOXYGEN_PROJECT_NAME "Cloud Dataplex API C++ Client" )
1919set (DOXYGEN_PROJECT_BRIEF "A C++ Client Library for the Cloud Dataplex API" )
2020set (DOXYGEN_PROJECT_NUMBER "${PROJECT_VERSION} " )
21- set (DOXYGEN_EXCLUDE_SYMBOLS "internal" "dataplex_internal" "dataplex_testing"
22- "examples" )
23- set (DOXYGEN_EXAMPLE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /samples
24- ${CMAKE_CURRENT_SOURCE_DIR} /quickstart)
21+ set (DOXYGEN_EXCLUDE_SYMBOLS "internal" )
22+ set (DOXYGEN_EXAMPLE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /quickstart" )
23+
24+ unset (mocks_globs)
25+ unset (source_globs)
26+ set (service_dirs "" "v1/" )
27+ foreach (dir IN LISTS service_dirs)
28+ string (REPLACE "/" "_" ns "${dir} " )
29+ list (APPEND source_globs "${dir} *.h" "${dir} *.cc" "${dir} internal/*" )
30+ list (APPEND mocks_globs "${dir} mocks/*.h" )
31+ list (APPEND DOXYGEN_EXCLUDE_SYMBOLS "dataplex_${ns} internal" )
32+ if (NOT dir STREQUAL "" )
33+ list (APPEND DOXYGEN_EXAMPLE_PATH
34+ "${CMAKE_CURRENT_SOURCE_DIR} /${dir} samples" )
35+ endif ()
36+ endforeach ()
2537
2638include (GoogleCloudCppDoxygen )
2739google_cloud_cpp_doxygen_targets ("dataplex" DEPENDS cloud-docs
@@ -47,7 +59,7 @@ target_link_libraries(google_cloud_cpp_dataplex_protos PUBLIC ${proto_deps})
4759file (
4860 GLOB source_files
4961 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR} "
50- "*.h" "*.cc" "internal/*.h" "internal/*.cc" )
62+ ${source_globs} )
5163list (SORT source_files)
5264add_library (google_cloud_cpp_dataplex ${source_files} )
5365target_include_directories (
@@ -77,7 +89,7 @@ add_library(google-cloud-cpp::dataplex ALIAS google_cloud_cpp_dataplex)
7789file (
7890 GLOB relative_mock_files
7991 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR} "
80- "mocks/*.h" )
92+ ${mocks_globs} )
8193list (SORT relative_mock_files)
8294set (mock_files)
8395foreach (file IN LISTS relative_mock_files)
@@ -179,3 +191,10 @@ install(
179191 COMPONENT google_cloud_cpp_development)
180192
181193external_googleapis_install_pc ("google_cloud_cpp_dataplex_protos" )
194+
195+ # google-cloud-cpp::dataplex must be defined before we can add the samples.
196+ foreach (dir IN LISTS service_dirs)
197+ if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
198+ google_cloud_cpp_add_samples_relative ("dataplex" "${dir} samples/" )
199+ endif ()
200+ endforeach ()
0 commit comments