2020-02-04 06:22:52 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2019-05-21 01:24:51 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2018-08-14 06:27:45 +08:00
|
|
|
|
2017-05-07 14:02:25 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO grpc/grpc
|
2024-06-22 04:39:50 +08:00
|
|
|
REF "v${VERSION}"
|
2024-11-14 18:30:13 +08:00
|
|
|
SHA512 a930bd9d8d0308f62fdda7ca215321b69a0cca8d8e0ce654b6938cd71dfd568fe63b5dd6ab0ee537e67751211e240b19cc23e07f5927dac318cf9be778d9fec2
|
2017-05-07 14:02:25 +08: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 10:11:54 +08:00
|
|
|
PATCHES
|
2019-04-19 17:27:19 +08:00
|
|
|
00001-fix-uwp.patch
|
|
|
|
00002-static-linking-in-linux.patch
|
2019-05-18 02:18:26 +08:00
|
|
|
00004-link-gdi32-on-windows.patch
|
2019-08-25 04:43:57 +08:00
|
|
|
00005-fix-uwp-error.patch
|
2024-11-14 18:30:13 +08:00
|
|
|
00006-utf8-range.patch
|
2022-07-23 01:58:10 +08:00
|
|
|
00015-disable-download-archive.patch
|
2024-06-22 04:39:50 +08:00
|
|
|
00016-fix-plugin-targets.patch
|
2024-11-14 18:30:13 +08:00
|
|
|
00017-fix-NAN-on-Win11.patch
|
|
|
|
00018-fix-windows-event-engine.patch
|
2017-02-17 17:18:32 +08:00
|
|
|
)
|
2024-07-30 14:08:48 +08:00
|
|
|
# Ensure de-vendoring
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${SOURCE_PATH}/third_party/abseil-cpp"
|
|
|
|
"${SOURCE_PATH}/third_party/cares"
|
|
|
|
"${SOURCE_PATH}/third_party/protobuf"
|
|
|
|
"${SOURCE_PATH}/third_party/re2"
|
|
|
|
"${SOURCE_PATH}/third_party/utf8_range"
|
|
|
|
"${SOURCE_PATH}/third_party/zlib"
|
|
|
|
)
|
2016-09-23 23:10:50 +08:00
|
|
|
|
2024-07-30 14:08:48 +08:00
|
|
|
if(VCPKG_CROSSCOMPILING)
|
2021-03-27 03:55:34 +08:00
|
|
|
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")
|
2018-04-26 21:23:44 +08:00
|
|
|
endif()
|
|
|
|
|
2020-02-04 06: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-04 06:22:52 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2018-05-18 11:15:15 +08:00
|
|
|
set(cares_CARES_PROVIDER OFF)
|
|
|
|
else()
|
|
|
|
set(cares_CARES_PROVIDER "package")
|
|
|
|
endif()
|
|
|
|
|
2021-04-24 01:40:07 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2021-05-04 05:14:17 +08: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 23:10:50 +08:00
|
|
|
-DgRPC_INSTALL=ON
|
2017-05-11 04:08:31 +08:00
|
|
|
-DgRPC_BUILD_TESTS=OFF
|
2019-04-19 17:27:19 +08:00
|
|
|
-DgRPC_STATIC_LINKING=${gRPC_STATIC_LINKING}
|
2017-05-11 04:08:31 +08:00
|
|
|
-DgRPC_MSVC_STATIC_RUNTIME=${gRPC_MSVC_STATIC_RUNTIME}
|
2016-09-23 23:10:50 +08: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-08-23 13:25:20 +08:00
|
|
|
-DgRPC_RE2_PROVIDER=package
|
2018-05-18 11:15:15 +08:00
|
|
|
-DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER}
|
2017-05-11 04:08:31 +08:00
|
|
|
-DgRPC_BENCHMARK_PROVIDER=none
|
2020-08-22 16:16:03 +08:00
|
|
|
-DgRPC_INSTALL_BINDIR:STRING=bin
|
2017-10-19 23:53:59 +08:00
|
|
|
-DgRPC_INSTALL_LIBDIR:STRING=lib
|
|
|
|
-DgRPC_INSTALL_INCLUDEDIR:STRING=include
|
2021-03-27 03:55:34 +08:00
|
|
|
-DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc
|
2022-05-27 06:24:58 +08:00
|
|
|
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
2022-08-10 02:51:49 +08:00
|
|
|
"-DProtobuf_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
2024-11-14 18:30:13 +08:00
|
|
|
-DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=OFF
|
2021-11-12 03:34:39 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
gRPC_MSVC_STATIC_RUNTIME
|
2016-09-23 23:10:50 +08:00
|
|
|
)
|
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
2017-05-11 04:08:31 +08:00
|
|
|
|
2021-11-12 03:34:39 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2016-09-23 23:10:50 +08:00
|
|
|
|
2020-08-22 16:16:03 +08: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-27 03:55:34 +08: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 16:16:03 +08:00
|
|
|
endif()
|
2018-04-26 21:23:44 +08:00
|
|
|
|
2022-07-15 05:08:28 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
|
2016-09-23 23:10:50 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2022-07-21 06:16:11 +08: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
|
|
|
|
2024-06-22 04:39:50 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|