From daa3ef16f4e6c68dc0f9e9a349cd327d50d415b3 Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Sat, 1 Mar 2014 12:08:01 +0100 Subject: Modify the option to specify if ZLIB should be used. In GROMACS there is an extra check to see that ZLIB can actually be linked against. This change uses those options properly. Change-Id: I910be0cf81a47c9feea2d3494925cc4a3c82dc4b diff --git a/CMakeLists.txt b/CMakeLists.txt index dab7a61..dded394 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ option(TNG_BUILD_TEST "Build TNG testing binary." ON) option(TNG_BUILD_COMPRESSION_TESTS "Build tests of the TNG compression library" OFF) find_package(ZLIB QUIET) +option(TNG_BUILD_WITH_ZLIB "Build TNG with zlib compression" ${ZLIB_FOUND}) include(CheckIncludeFile) check_include_file(inttypes.h HAVE_INTTYPES_H) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 45e13d2..c760f57 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -23,7 +23,7 @@ if(TNG_INTEGER_BIG_ENDIAN) set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS TNG_INTEGER_BIG_ENDIAN) endif() -if(ZLIB_FOUND) +if(TNG_BUILD_WITH_ZLIB) set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS USE_ZLIB) target_link_libraries(tng_io tng_compress ${ZLIB_LIBRARIES}) else() -- cgit v0.10.1