[grpc] Fix build for linux

Fix
This commit is contained in:
Alexander Karatarakis 2018-04-18 16:32:10 -07:00
parent c400cea91d
commit 14708a09a9
3 changed files with 28 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Source: grpc
Version: 1.10.1
Version: 1.10.1-1
Build-Depends: zlib, openssl, protobuf, c-ares
Description: An RPC library and framework

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0dc0bd3..7f702cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4699,6 +4699,7 @@ endif (gRPC_BUILD_TESTS)
option(gRPC_INSTALL_CSHARP_EXT "" ON)
+if(gRPC_INSTALL_CSHARP_EXT)
add_library(grpc_csharp_ext SHARED
src/csharp/ext/grpc_csharp_ext.c
)
@@ -4741,6 +4742,7 @@ if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
+endif()
if (gRPC_BUILD_TESTS)

View File

@ -22,6 +22,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch
${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext-2.patch
)
if(VCPKG_CRT_LINKAGE STREQUAL static)
@ -66,8 +67,12 @@ if(TOOLS)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
else()
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) # Leave the executable files in bin/ and debug/bin
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()