cmake: only install channelz if gRPC_USE_PROTO_LITE is off (#25772)

* only install channelz if not USE_PROTO_LITE

* adapted CMakeLists.txt.template to not install channelz when USE_PROTO_LITE
pull/25653/head
Timo Lange 4 years ago committed by GitHub
parent 4c59b17d40
commit f3abcd3ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CMakeLists.txt
  2. 6
      templates/CMakeLists.txt.template

@ -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}

@ -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>

Loading…
Cancel
Save