From 6affd51405942e59f0b4baa256e683972de3ef79 Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Mon, 22 Aug 2022 22:51:28 +0200 Subject: [PATCH] Update abseil-cpp.cmake (#10436) --- 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 746673245c..94c25de863 100644 --- a/cmake/abseil-cpp.cmake +++ b/cmake/abseil-cpp.cmake @@ -2,7 +2,10 @@ set(ABSL_PROPAGATE_CXX_STD ON) -if(protobuf_ABSL_PROVIDER STREQUAL "module") +if(TARGET absl::strings) + # If Abseil is included already, skip including it. + # (https://github.com/protocolbuffers/protobuf/issues/10435) +elseif(protobuf_ABSL_PROVIDER STREQUAL "module") if(NOT ABSL_ROOT_DIR) set(ABSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/abseil-cpp) endif()