Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
cmake: only install channelz if gRPC_USE_PROTO_LITE is off (grpc#25772)
Browse files Browse the repository at this point in the history
* only install channelz if not USE_PROTO_LITE

* adapted CMakeLists.txt.template to not install channelz when USE_PROTO_LITE
  • Loading branch information
tiolan authored Apr 9, 2021
1 parent 4c59b17 commit f3abcd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3800,7 +3800,9 @@ endif()

if(gRPC_BUILD_CODEGEN)

if(gRPC_INSTALL)
# grpcpp_channelz doesn't build with protobuf-lite, so no install required
# See https://github.com/grpc/grpc/issues/22826
if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE)
install(TARGETS grpcpp_channelz EXPORT gRPCTargets
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
Expand Down
6 changes: 6 additions & 0 deletions templates/CMakeLists.txt.template
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,13 @@
</%def>

<%def name="cc_install(tgt)">
% if tgt.name == 'grpcpp_channelz':
# grpcpp_channelz doesn't build with protobuf-lite, so no install required
# See https://github.com/grpc/grpc/issues/22826
if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE)
% else:
if(gRPC_INSTALL)
% endif
install(TARGETS ${tgt.name} EXPORT gRPCTargets
RUNTIME DESTINATION <%text>${gRPC_INSTALL_BINDIR}</%text>
LIBRARY DESTINATION <%text>${gRPC_INSTALL_LIBDIR}</%text>
Expand Down

0 comments on commit f3abcd3

Please sign in to comment.