From: Richael Zhuang Date: Tue, 13 Feb 2018 02:51:02 +0000 (+0800) Subject: Fix dependency problem about cmake options X-Git-Tag: 1.9.9-b1~650 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c4f0a00e3c3479992063ead46aeebe5ec4aa4d0;p=thirdparty%2Fzlib-ng.git Fix dependency problem about cmake options According to the content of CMakeLists.txt, if building with "-DZLIB_COMPAT=ON", the value of WITH_GZFILEOP should be ON too. However, WITH_GZFILEOP is OFF actually when you run "cmake .. -DZIB_COMPAT=ON", which will cause errors if you use gzfile related functions. This patch fixes the problem by adjusting the position of WITH_GZFILEOP option. Signed-off-by: Richael Zhuang --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 01a75647..99d20f75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ else() endif() message(STATUS "Architecture: ${ARCH}") +option (WITH_GZFILEOP "Compile with support for gzFile related functions" OFF) option (ZLIB_COMPAT "Compile with zlib compatible API" OFF) if (ZLIB_COMPAT) add_definitions(-DZLIB_COMPAT) @@ -61,7 +62,6 @@ else(ZLIB_COMPAT) set (SUFFIX "-ng") endif (ZLIB_COMPAT) -option (WITH_GZFILEOP "Compile with support for gzFile related functions" OFF) if (WITH_GZFILEOP) add_definitions(-DWITH_GZFILEOP) endif (WITH_GZFILEOP)