diff --git a/CMakeLists.txt b/CMakeLists.txt index c85a20a..99b2897 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3694,6 +3694,7 @@ target_link_libraries(qps endif (gRPC_BUILD_TESTS) +option(gRPC_INSTALL_CSHARP_EXT "" ON) add_library(grpc_csharp_ext SHARED src/csharp/ext/grpc_csharp_ext.c ) @@ -3702,7 +3703,7 @@ if(WIN32 AND MSVC) set_target_properties(grpc_csharp_ext PROPERTIES COMPILE_PDB_NAME "grpc_csharp_ext" COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) - if (gRPC_INSTALL) + if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL ) @@ -3728,8 +3729,7 @@ target_link_libraries(grpc_csharp_ext ) - -if (gRPC_INSTALL) +if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) install(TARGETS grpc_csharp_ext EXPORT gRPCTargets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}