build grpc_csharp_ext as shared

pull/9568/head
Jan Tattermusch 8 years ago
parent 26623b3d77
commit c09656c5e1
  1. 4
      CMakeLists.txt
  2. 5
      templates/CMakeLists.txt.template

@ -87,6 +87,8 @@ if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if (MSVC)
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
# needed to compile boringssl
@ -3321,7 +3323,7 @@ target_link_libraries(qps
endif (gRPC_BUILD_TESTS)
add_library(grpc_csharp_ext
add_library(grpc_csharp_ext SHARED
src/csharp/ext/grpc_csharp_ext.c
)

@ -129,6 +129,9 @@
if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
endif()
## Some libraries are shared even with BUILD_SHARED_LIBRARIES=OFF
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if (MSVC)
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
@ -428,7 +431,7 @@
% endfor
<%def name="cc_library(lib)">
add_library(${lib.name}
add_library(${lib.name}${' SHARED' if lib.get('dll', None) == 'only' else ''}
% for src in lib.src:
% if not proto_re.match(src):
${src}

Loading…
Cancel
Save