mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add cmake check to verify that zlib supports the gzip format.
This commit is contained in:
parent
7c83033899
commit
a9ac4bbf41
@ -53,6 +53,20 @@ find_package(Libgcrypt REQUIRED)
|
|||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
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")
|
||||||
|
endif(NOT ZLIB_SUPPORTS_GZIP)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
if( WITH_TESTS )
|
if( WITH_TESTS )
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
|
Loading…
Reference in New Issue
Block a user