diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ca2f2ea..593511f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,9 @@ option(WITH_ZLIB "Build with ZLIB" ON) if(WITH_ZLIB) find_package("ZLIB") set(HAVE_ZLIB ${ZLIB_FOUND}) + if(ZLIB_FOUND) + set(ZLIB_LIBRARIES_FLAGS -lz) + endif() endif() if(NOT WIN32)