Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdolfo E. García <adolfo.garcia.cr@gmail.com>2017-10-15 15:02:34 +0300
committerAdolfo E. García <adolfo.garcia.cr@gmail.com>2017-10-21 19:12:28 +0300
commit2fa3f5072d2010c402d44c394b208cd32f108aea (patch)
treed681249c48d92971d3e7f194f71deb4fbae4bbbe /CMakeLists.txt
parent7cc6f6f2a3d97e006fd5dba99d648aab7dbf34aa (diff)
Simplify the ZLIB version check
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 2 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ec37473c..bfefcadd1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,17 +240,8 @@ find_package(ZLIB REQUIRED)
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
-check_cxx_source_compiles("
- #include <zlib.h>
-
- #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1200)
- #error zlib 1.2.x or higher is required to use the gzip format
- #endif
-
- int main() { return 0; }" ZLIB_SUPPORTS_GZIP)
-
-if(NOT ZLIB_SUPPORTS_GZIP)
- message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
+if(ZLIB_VERSION_STRING VERSION_LESS "1.2.0")
+ message(FATAL_ERROR "zlib 1.2.0 or higher is required to use the gzip format")
endif()
# Optional