From b6ee841d7cf1792ff6d21a349c4f838255c4fd7f Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 6 May 2022 15:09:13 -0700 Subject: [PATCH] Added cmake abseil include guard --- cmake/abseil-cpp.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake index 10e7e5c00b..8aff9d6a23 100644 --- a/cmake/abseil-cpp.cmake +++ b/cmake/abseil-cpp.cmake @@ -1,4 +1,7 @@ -if(protobuf_ABSL_PROVIDER STREQUAL "module") +if(TARGET absl::strings) + # If absl is included already, skip including it. + # (https://github.com/grpc/grpc/issues/29608) +elseif(protobuf_ABSL_PROVIDER STREQUAL "module") if(NOT ABSL_ROOT_DIR) set(ABSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/abseil-cpp) endif()