summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2014-08-22 06:56:44 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2014-08-22 06:56:44 (GMT)
commite911a83596f03ba96d331c6176a8ceda018624b8 (patch)
tree8a112ba32f599fe57ce781606972f70704e1fb46 /CMakeLists.txt
parent49a5d89648db2e4167f3df9bdba416c4d0ba11e8 (diff)
Fix ZLIB usage.
Using zlib for TNG requires also that the the #include file can be found, and this can be in a non-standard path. (Committed by Mark Abraham in the GROMACS repository.) Change-Id: I607105b9702b8f75f416fec584888b05897f32fa
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7fc6ad6..5940696 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,16 +31,17 @@ tng_get_source_list(TNG_SOURCES TNG_COMPILE_DEFS)
tng_set_source_properties(WITH_ZLIB ${ZLIB_FOUND})
+add_library(tng_io ${TNG_SOURCES})
+
if (ZLIB_FOUND)
list(APPEND EXTRA_LIBRARIES ${ZLIB_LIBRARIES})
+ include_directories(${ZLIB_INCLUDE_DIRS})
endif()
if (UNIX)
list(APPEND EXTRA_LIBRARIES m)
endif()
-add_library(tng_io ${TNG_SOURCES})
-
target_link_libraries(tng_io ${EXTRA_LIBRARIES})
set_target_properties(tng_io PROPERTIES VERSION ${TNG_IO_VERSION} SOVERSION ${TNG_MAJOR_VERSION})
contact: Jan Huwald // Impressum