diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-03-01 11:08:01 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-03-01 11:08:01 (GMT) |
commit | daa3ef16f4e6c68dc0f9e9a349cd327d50d415b3 (patch) | |
tree | 26dfd77f1cbf2f122f590e09d3e2c905a8540e1a | |
parent | 60bfa964747c9ff03b40f049713c90afcc17acb6 (diff) |
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
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/lib/CMakeLists.txt | 2 |
2 files changed, 2 insertions, 1 deletions
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() |