summaryrefslogtreecommitdiff
path: root/cmake/zlib.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/zlib.cmake')
-rw-r--r--cmake/zlib.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
index 3ede3aba228..83597357aba 100644
--- a/cmake/zlib.cmake
+++ b/cmake/zlib.cmake
@@ -57,13 +57,17 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_LIBRARIES z)
CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
+ CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
+ CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
SET(CMAKE_REQUIRED_LIBRARIES)
- IF(HAVE_CRC32)
+ IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
SET(ZLIB_LIBRARY z CACHE INTERNAL "System zlib library")
- SET(WITH_ZLIB "system" CACHE STRING "Which zlib to use (possible values are 'bundled' or 'system')")
+ SET(WITH_ZLIB "system" CACHE STRING
+ "Which zlib to use (possible values are 'bundled' or 'system')")
SET(ZLIB_SOURCES "")
ELSE()
SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
+ MESSAGE(STATUS "system zlib found but not usable")
ENDIF()
ENDIF()
IF(NOT ZLIB_FOUND)