2020-02-03 14:22:52 -08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2019-05-20 20:24:51 +03:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2018-08-14 00:27:45 +02:00
|
|
|
|
2017-05-06 23:02:25 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO grpc/grpc
|
2023-01-16 21:53:23 +01:00
|
|
|
REF v1.51.1
|
|
|
|
SHA512 1bc8e7a5a15b2dca88527d111cde398b0dc1921bbc945c6df8225b4225b8ac0b43155bcf743230ce7b5962d1ab948e9363229c98a879b1befc7a939a290fb888
|
2017-05-06 23:02:25 -07:00
|
|
|
HEAD_REF master
|
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 04:11:54 +02:00
|
|
|
PATCHES
|
2019-04-19 17:27:19 +08:00
|
|
|
00001-fix-uwp.patch
|
|
|
|
00002-static-linking-in-linux.patch
|
2019-05-17 11:18:26 -07:00
|
|
|
00003-undef-base64-macro.patch
|
|
|
|
00004-link-gdi32-on-windows.patch
|
2019-08-24 13:43:57 -07:00
|
|
|
00005-fix-uwp-error.patch
|
2020-02-03 14:22:52 -08:00
|
|
|
00009-use-system-upb.patch
|
2020-03-09 16:37:52 -07:00
|
|
|
snprintf.patch
|
2020-11-20 11:53:48 -08:00
|
|
|
00012-fix-use-cxx17.patch
|
2021-07-27 15:29:44 -07:00
|
|
|
00014-pkgconfig-upbdefs.patch
|
2022-07-22 19:58:10 +02:00
|
|
|
00015-disable-download-archive.patch
|
2017-02-17 01:18:32 -08:00
|
|
|
)
|
2016-09-23 18:10:50 +03:00
|
|
|
|
2021-05-03 14:14:17 -07:00
|
|
|
if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
|
2021-03-26 12:55:34 -07:00
|
|
|
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")
|
2018-04-26 15:23:44 +02:00
|
|
|
endif()
|
|
|
|
|
2020-02-03 14:22:52 -08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" gRPC_MSVC_STATIC_RUNTIME)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" gRPC_STATIC_LINKING)
|
2019-04-19 17:27:19 +08:00
|
|
|
|
2020-02-03 14:22:52 -08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2018-05-17 20:15:15 -07:00
|
|
|
set(cares_CARES_PROVIDER OFF)
|
|
|
|
else()
|
|
|
|
set(cares_CARES_PROVIDER "package")
|
|
|
|
endif()
|
|
|
|
|
2021-04-23 10:40:07 -07:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2021-05-03 14:14:17 -07:00
|
|
|
codegen gRPC_BUILD_CODEGEN
|
2020-05-21 05:20:37 +08:00
|
|
|
)
|
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-05-21 05:20:37 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2016-09-23 18:10:50 +03:00
|
|
|
-DgRPC_INSTALL=ON
|
2017-05-10 23:08:31 +03:00
|
|
|
-DgRPC_BUILD_TESTS=OFF
|
2019-04-19 17:27:19 +08:00
|
|
|
-DgRPC_STATIC_LINKING=${gRPC_STATIC_LINKING}
|
2017-05-10 23:08:31 +03:00
|
|
|
-DgRPC_MSVC_STATIC_RUNTIME=${gRPC_MSVC_STATIC_RUNTIME}
|
2016-09-23 18:10:50 +03:00
|
|
|
-DgRPC_ZLIB_PROVIDER=package
|
|
|
|
-DgRPC_SSL_PROVIDER=package
|
|
|
|
-DgRPC_PROTOBUF_PROVIDER=package
|
2020-02-12 08:33:48 +08:00
|
|
|
-DgRPC_ABSL_PROVIDER=package
|
2020-06-24 05:36:26 +08:00
|
|
|
-DgRPC_UPB_PROVIDER=package
|
2020-08-23 07:25:20 +02:00
|
|
|
-DgRPC_RE2_PROVIDER=package
|
2018-04-26 15:23:44 +02:00
|
|
|
-DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG
|
2018-05-17 20:15:15 -07:00
|
|
|
-DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER}
|
2017-05-10 23:08:31 +03:00
|
|
|
-DgRPC_BENCHMARK_PROVIDER=none
|
2020-08-22 10:16:03 +02:00
|
|
|
-DgRPC_INSTALL_BINDIR:STRING=bin
|
2017-10-19 08:53:59 -07:00
|
|
|
-DgRPC_INSTALL_LIBDIR:STRING=lib
|
|
|
|
-DgRPC_INSTALL_INCLUDEDIR:STRING=include
|
2021-03-26 12:55:34 -07:00
|
|
|
-DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc
|
2022-05-26 18:24:58 -04:00
|
|
|
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
2022-08-09 14:51:49 -04:00
|
|
|
"-DProtobuf_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
2021-11-12 03:34:39 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
gRPC_MSVC_STATIC_RUNTIME
|
2016-09-23 18:10:50 +03:00
|
|
|
)
|
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
2017-05-10 23:08:31 +03:00
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2016-09-23 18:10:50 +03:00
|
|
|
|
2020-08-22 10:16:03 +02:00
|
|
|
if (gRPC_BUILD_CODEGEN)
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
AUTO_CLEAN
|
|
|
|
TOOL_NAMES
|
|
|
|
grpc_php_plugin
|
|
|
|
grpc_python_plugin
|
|
|
|
grpc_node_plugin
|
|
|
|
grpc_objective_c_plugin
|
|
|
|
grpc_csharp_plugin
|
|
|
|
grpc_cpp_plugin
|
|
|
|
grpc_ruby_plugin
|
|
|
|
)
|
2021-03-26 12:55:34 -07:00
|
|
|
else()
|
2021-11-12 03:34:39 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/gRPCTargets-vcpkg-tools.cmake" "${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-vcpkg-tools.cmake" @ONLY)
|
2020-08-22 10:16:03 +02:00
|
|
|
endif()
|
2018-04-26 15:23:44 +02:00
|
|
|
|
2022-07-14 23:08:28 +02:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
|
2016-09-23 18:10:50 +03:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2022-07-21 00:16:11 +02:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
|
|
|
else()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|
2020-10-20 10:15:04 +08:00
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|