This repository was archived by the owner on Dec 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ install(TARGETS ${googleapis_cpp_installed_libraries_list}
267267
268268foreach (target ${googleapis_cpp_installed_libraries_list} )
269269 google_cloud_cpp_install_proto_library_headers("${target} " )
270- google_cloud_cpp_install_proto_library_protos("${target} " )
270+ google_cloud_cpp_install_proto_library_protos("${target} " " ${GOOGLEAPIS_CPP_SOURCE} " )
271271endforeach ()
272272
273273# Export the CMake targets to make it easy to create configuration files.
Original file line number Diff line number Diff line change @@ -221,22 +221,22 @@ function (google_cloud_cpp_install_proto_library_headers target)
221221endfunction ()
222222
223223# Install protos for a C++ proto library.
224- function (google_cloud_cpp_install_proto_library_protos target )
224+ function (google_cloud_cpp_install_proto_library_protos target strip_prefix )
225225 get_target_property (target_protos ${target} PROTO_SOURCES)
226- foreach (header ${target_protos} )
226+ foreach (proto ${target_protos} )
227227 # Skip anything that is not a header file.
228- if (NOT "${header } " MATCHES "\\ .proto$" )
228+ if (NOT "${proto } " MATCHES "\\ .proto$" )
229229 continue ()
230230 endif ()
231- string (REPLACE "${CMAKE_CURRENT_BINARY_DIR } /"
232- ""
233- relative
234- "${header } " )
231+ string (REPLACE "${strip_prefix } /"
232+ ""
233+ relative
234+ "${proto } " )
235235 get_filename_component (dir "${relative} " DIRECTORY )
236236 # This is modeled after the Protobuf library, it installs the basic
237237 # protos (think google/protobuf/any.proto) in the include directory for
238238 # C/C++ code. :shrug:
239- install (FILES "${header } " DESTINATION
239+ install (FILES "${proto } " DESTINATION
240240 "${CMAKE_INSTALL_INCLUDEDIR} /${dir} " )
241241 endforeach ()
242242endfunction ()
You can’t perform that action at this time.
0 commit comments