2017-01-14 02:55:04 +01:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
2016-10-26 15:26:56 -07:00
|
|
|
endif()
|
2016-09-23 18:10:50 +03:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-04-21 17:05:43 -07:00
|
|
|
set(GRPC_VERSION 1.2.3)
|
2017-04-18 17:29:24 -07:00
|
|
|
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/grpc-${GRPC_VERSION})
|
2016-09-23 18:10:50 +03:00
|
|
|
|
2017-02-17 01:18:32 -08:00
|
|
|
if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
|
2016-09-23 18:10:50 +03:00
|
|
|
endif()
|
|
|
|
|
2017-05-06 23:02:25 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO grpc/grpc
|
|
|
|
REF v1.2.3
|
|
|
|
SHA512 51e3c2f866fcac861ca007dd022373e63f82c63754001d1182ea14dd2eff2dfba325f8bc130ddf94e4ae35e23299ca337a6c5c6a9cee145f9e5c79e4c46af280
|
|
|
|
HEAD_REF master
|
2017-02-17 01:18:32 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-04-21 17:05:43 -07:00
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch
|
2017-02-17 01:18:32 -08:00
|
|
|
)
|
2016-09-23 18:10:50 +03:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-02-17 01:18:32 -08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-04-21 17:05:43 -07:00
|
|
|
PREFER_NINJA
|
2016-09-23 18:10:50 +03:00
|
|
|
OPTIONS
|
|
|
|
-DgRPC_INSTALL=ON
|
|
|
|
-DgRPC_ZLIB_PROVIDER=package
|
|
|
|
-DgRPC_SSL_PROVIDER=package
|
|
|
|
-DgRPC_PROTOBUF_PROVIDER=package
|
2017-04-21 17:05:43 -07:00
|
|
|
-DCMAKE_INSTALL_CMAKEDIR=share/grpc
|
2016-09-23 18:10:50 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-05-06 23:02:25 -07:00
|
|
|
vcpkg_fixup_cmake_targets()
|
2016-09-23 18:10:50 +03:00
|
|
|
|
2017-02-17 01:18:32 -08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright)
|
2016-09-23 18:10:50 +03:00
|
|
|
|
2017-02-07 15:30:19 -05:00
|
|
|
# Install tools and plugins
|
2017-04-21 17:05:43 -07:00
|
|
|
file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe")
|
|
|
|
if(TOOLS)
|
2017-05-06 23:02:25 -07:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc)
|
|
|
|
file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc)
|
2017-04-21 17:05:43 -07:00
|
|
|
endif()
|
2017-02-07 15:30:19 -05:00
|
|
|
|
2016-09-23 18:10:50 +03:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
2017-01-14 02:55:04 +01:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2017-05-06 23:02:25 -07:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2016-09-23 18:10:50 +03:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|