]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix dependency problem about cmake options
authorRichael Zhuang <richael.zhuang@arm.com>
Tue, 13 Feb 2018 02:51:02 +0000 (10:51 +0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 16 Feb 2018 10:32:43 +0000 (11:32 +0100)
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 <richael.zhuang@arm.com>
CMakeLists.txt

index 01a75647dd07cacb71f0693c1cd64f170a3acac7..99d20f7567bfa5ede96c7ddef218c90111423397 100644 (file)
@@ -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)