From 40cdc20f97c70937cfa8f1368b02299af0eba43c Mon Sep 17 00:00:00 2001 From: kai lin Date: Wed, 28 Jan 2026 12:45:05 -0500 Subject: [PATCH] added a check for NOT ENABLE_ZLIB_REQUEST_COMPRESSION STREQUAL "OFF" removed the nested ifs --- cmake/external_dependencies.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/external_dependencies.cmake b/cmake/external_dependencies.cmake index 17ddce5405eb..80fb8989f900 100644 --- a/cmake/external_dependencies.cmake +++ b/cmake/external_dependencies.cmake @@ -2,8 +2,10 @@ if(PLATFORM_ANDROID AND ANDROID_BUILD_ZLIB) set(BUILD_ZLIB 1) message(STATUS " Building Zlib as part of AWS SDK") -elseif(NOT PLATFORM_WINDOWS AND NOT PLATFORM_CUSTOM) - #If zlib is required either by openssl and curl in their linking chain, we should find it. +# If ENABLE_ZLIB_REQUEST_COMPRESSION is OFF, zlib check is skipped entirely +elseif(NOT PLATFORM_WINDOWS AND NOT PLATFORM_CUSTOM AND + NOT ENABLE_ZLIB_REQUEST_COMPRESSION STREQUAL "OFF") + # If zlib is required either by openssl and curl in their linking chain, we should find it. include(FindZLIB) if(NOT ZLIB_FOUND) message(FATAL_ERROR "Could not find zlib")