From 7423fc52a42a441509727b06c0907143a3481a51 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 12 Feb 2024 09:39:28 +0400 Subject: [PATCH] Unset HAVE_ZLIB which can be set by external projects (#22774) ### Details: - Required for compatibility with NPU repo, where dependencies can set `HAVE_ZLIB` cmake cache variables, which affects `protobuf` during rebuild. ### Tickets: - CVS-130134 --- thirdparty/protobuf/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt index 4b6d6da87f346a..f5f844e1db9a0e 100644 --- a/thirdparty/protobuf/CMakeLists.txt +++ b/thirdparty/protobuf/CMakeLists.txt @@ -24,6 +24,9 @@ set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE) set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE) set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "Abseil protogate CXX standard to dependent targets" FORCE) +# some projects define HAVE_ZLIB, which affects protobuf. Let's explicitly unset it +unset(HAVE_ZLIB CACHE) + # note: HOST_AARCH64 AND X86_64 are not handled for Apple explicitly, because it can work via Rosetta if(CMAKE_CROSSCOMPILING OR (APPLE AND (HOST_X86_64 AND AARCH64)) OR