vcpkg/ports/grpc/00010-add-feature-absl-sync.patch
2020-10-19 19:15:04 -07:00

35 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bae849..a23fdf3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1899,6 +1899,8 @@ target_link_libraries(grpc
absl::status
absl::inlined_vector
absl::flat_hash_set
+ absl::time
+ absl::synchronization
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc "-framework CoreFoundation")
@@ -2508,6 +2510,8 @@ target_link_libraries(grpc_unsecure
absl::strings
absl::status
absl::inlined_vector
+ absl::time
+ absl::synchronization
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake
index 078d495..b6f50bd 100644
--- a/cmake/abseil-cpp.cmake
+++ b/cmake/abseil-cpp.cmake
@@ -37,4 +37,7 @@ elseif(gRPC_ABSL_PROVIDER STREQUAL "package")
# Use "CONFIG" as there is no built-in cmake module for absl.
find_package(absl REQUIRED CONFIG)
set(_gRPC_FIND_ABSL "if(NOT absl_FOUND)\n find_package(absl CONFIG)\nendif()")
+ if (gRPC_ABSL_SYNC_ENABLE)
+ add_definitions(-DGPR_ABSEIL_SYNC=1)
+ endif()
endif()