2020-08-23 13:25:20 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 48bc6cf0de..399aff7d1e 100644
|
2020-08-08 02:46:49 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-08-23 13:25:20 +08:00
|
|
|
@@ -1854,10 +1854,14 @@ endif()
|
2020-08-08 02:46:49 +08:00
|
|
|
|
|
|
|
if(gRPC_BUILD_CSHARP_EXT)
|
|
|
|
|
|
|
|
-add_library(grpc_csharp_ext SHARED
|
|
|
|
+add_library(grpc_csharp_ext
|
|
|
|
src/csharp/ext/grpc_csharp_ext.c
|
|
|
|
)
|
|
|
|
|
|
|
|
+if (WIN32 AND BUILD_SHARED_LIBS)
|
|
|
|
+ target_compile_definitions(grpc_csharp_ext PUBLIC GPR_WINDOWS)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
set_target_properties(grpc_csharp_ext PROPERTIES
|
|
|
|
VERSION ${gRPC_CORE_VERSION}
|
|
|
|
SOVERSION ${gRPC_CORE_SOVERSION}
|
2020-08-23 13:25:20 +08:00
|
|
|
@@ -1871,6 +1875,12 @@ if(WIN32 AND MSVC)
|
2020-08-08 02:46:49 +08:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb
|
|
|
|
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
|
|
|
|
)
|
2020-08-22 16:16:03 +08:00
|
|
|
+
|
2020-08-08 02:46:49 +08:00
|
|
|
+ install(TARGETS grpc_csharp_ext
|
|
|
|
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
|
|
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
|
|
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
|
|
+ )
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|