Skip to content

Commit

Permalink
[grpc] Update to version 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KindDragon committed May 11, 2017
1 parent 083bfa1 commit 7759a55
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ports/grpc/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: grpc
Version: 1.2.3-1
Build-Depends: zlib, openssl, protobuf
Version: 1.3.1
Build-Depends: zlib, openssl, protobuf, c-ares
Description: An RPC library and framework
20 changes: 18 additions & 2 deletions ports/grpc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()

include(vcpkg_common_functions)

if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
Expand All @@ -11,27 +12,42 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO grpc/grpc
REF v1.2.3
SHA512 51e3c2f866fcac861ca007dd022373e63f82c63754001d1182ea14dd2eff2dfba325f8bc130ddf94e4ae35e23299ca337a6c5c6a9cee145f9e5c79e4c46af280
REF v1.3.1
SHA512 1c9f35e84995158b75bb8694bb9d8c5ddafccf347c4827213290b221f9fc3ab9071c9f79a10a563e9cdfabae3f4b83d6148907f106066f54093242f818038438
HEAD_REF master
)

# Issue: https://github.com/grpc/grpc/issues/10759
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL static)
set(gRPC_MSVC_STATIC_RUNTIME ON)
else()
set(gRPC_MSVC_STATIC_RUNTIME OFF)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DgRPC_INSTALL=ON
-DgRPC_BUILD_TESTS=OFF
-DgRPC_MSVC_STATIC_RUNTIME=${gRPC_MSVC_STATIC_RUNTIME}
-DgRPC_ZLIB_PROVIDER=package
-DgRPC_SSL_PROVIDER=package
-DgRPC_PROTOBUF_PROVIDER=package
-DgRPC_CARES_PROVIDER=package
-DgRPC_GFLAGS_PROVIDER=none
-DgRPC_BENCHMARK_PROVIDER=none
-DCMAKE_INSTALL_CMAKEDIR=share/grpc
)

# gRPC runs built executables during the build, so they need access to the installed DLLs.
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()

Expand Down

0 comments on commit 7759a55

Please sign in to comment.