diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index edd533c3..0b7b2869 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -362,12 +362,24 @@ endif() # Support for compressed logs ################################################################################ find_package(ZLIB) -if (${ZLIB_FOUND}) - set(HAVE_ZLIB_H 1) # For config.h - set(TARGET_LIBS ${TARGET_LIBS} z) - list(APPEND KLEE_COMPONENT_EXTRA_LIBRARIES ${ZLIB_LIBRARIES}) - list(APPEND KLEE_COMPONENT_EXTRA_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) +if (ZLIB_FOUND) + set(ENABLE_ZLIB_DEFAULT ON) else() + set(ENABLE_ZLIB_DEFAULT OFF) +endif() +option(ENABLE_ZLIB "Enable use of zlib" ${ENABLE_ZLIB_DEFAULT}) +if (ENABLE_ZLIB) + message(STATUS "Zlib support enabled") + if (ZLIB_FOUND) + set(HAVE_ZLIB_H 1) # For config.h + set(TARGET_LIBS ${TARGET_LIBS} z) + list(APPEND KLEE_COMPONENT_EXTRA_LIBRARIES ${ZLIB_LIBRARIES}) + list(APPEND KLEE_COMPONENT_EXTRA_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) + else() + message(FATAL_ERROR "ENABLE_ZLIB is true but zlib could not be found") + endif() +else() + message(STATUS "Zlib support disabled") unset(HAVE_ZLIB_H) # For config.h endif() |