diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2013-02-20 11:24:16 +0100 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2013-02-20 11:24:16 +0100 |
commit | 467b65545e4ed865f0b36cf94baed1f90b5ce961 (patch) | |
tree | d57aaed0fe5db2cb28eb452dd64769d1c0e0d85c /cmake | |
parent | 80da65a1a47f56828493738d844788b59de5e9a1 (diff) | |
download | mariadb-git-467b65545e4ed865f0b36cf94baed1f90b5ce961.tar.gz |
Bug#14300733 CMAKE DOES NOT CHECK FOR ZLIB VERSION
Add check for compressBound() and deflateBound()
Keep existing functionality: fallback to bundled zlib if functions not found.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/zlib.cmake | 8 |
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) |