Skip to content

Commit 94355b0

Browse files
authored
fix(pubsub): install admin mocks (#13537)
1 parent c5875ba commit 94355b0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

cmake/GoogleCloudCppCommon.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ function (google_cloud_cpp_install_headers target destination)
4747
get_target_property(target_sources ${target} SOURCES)
4848
endif ()
4949
foreach (header ${target_sources})
50+
# Sometimes we use generator expressions for the headers.
51+
string(REPLACE "$<BUILD_INTERFACE:" "" header "${header}")
52+
string(REPLACE ">" "" header "${header}")
53+
54+
# Only install headers.
5055
if (NOT "${header}" MATCHES "\\.h$" AND NOT "${header}" MATCHES
5156
"\\.inc$")
5257
continue()

google/cloud/pubsub/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,8 @@ install(
519519
TARGETS google_cloud_cpp_pubsub_mocks
520520
EXPORT pubsub_mocks-targets
521521
COMPONENT google_cloud_cpp_development)
522-
install(
523-
FILES ${google_cloud_cpp_pubsub_mocks_hdrs}
524-
DESTINATION "include/google/cloud/pubsub/mocks"
525-
COMPONENT google_cloud_cpp_development)
526-
install(
527-
FILES ${google_cloud_cpp_pubsub_mocks_hdrs}
528-
DESTINATION "include/google/cloud/pubsub/admin/mocks"
529-
COMPONENT google_cloud_cpp_development)
522+
google_cloud_cpp_install_headers(google_cloud_cpp_pubsub_mocks
523+
"include/google/cloud/pubsub")
530524

531525
google_cloud_cpp_add_pkgconfig(
532526
pubsub

0 commit comments

Comments
 (0)