vcpkg/ports/grpc/00011-fix-csharp_plugin.patch
Jozef Izso ba2e63548f
[grpc] Update to v1.32.0 - use correct port version (#14152)
* [grpc] grpc v1.32.0 - use correct port version

* [grpc] update 00001-fix-uwp.patch

* [grpc] update 00002-static-linking-in-linux.patch

* [grpc] update 00004-link-gdi32-on-windows.patch

* [grpc] update 00011-fix-csharp_plugin.patch
2020-10-22 22:46:48 -07:00

34 lines
941 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a23fdf3dda..7eb8d5200a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1940,10 +1940,14 @@ endif()
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}
@@ -1957,6 +1961,12 @@ if(WIN32 AND MSVC)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
)
+
+ install(TARGETS grpc_csharp_ext
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
endif()
endif()