aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/minizip/CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/minizip/CMakeLists.txt b/contrib/minizip/CMakeLists.txt
index 1aaf4ac7..9f95a4ee 100644
--- a/contrib/minizip/CMakeLists.txt
+++ b/contrib/minizip/CMakeLists.txt
@@ -44,6 +44,18 @@ if(NOT CPACK_INCLUDED)
44 include(CPack) 44 include(CPack)
45endif(NOT CPACK_INCLUDED) 45endif(NOT CPACK_INCLUDED)
46 46
47if(NOT DEFINED ZLIB_BUILD_MINIZIP)
48 if(MINIZIP_BUILD_SHARED)
49 list(APPEND REQUIRED_COMPONENTS "shared")
50 endif(MINIZIP_BUILD_SHARED)
51
52 if(MINIZIP_BUILD_STATIC)
53 list(APPEND REQUIRED_COMPONENTS "static")
54 endif(MINIZIP_BUILD_STATIC)
55
56 find_package(ZLIB REQUIRED COMPONENTS ${REQUIRED_COMPONENTS} CONFIG)
57endif(NOT DEFINED ZLIB_BUILD_MINIZIP)
58
47if(MINIZIP_ENABLE_BZIP2) 59if(MINIZIP_ENABLE_BZIP2)
48 find_package(BZip2 REQUIRED) 60 find_package(BZip2 REQUIRED)
49endif(MINIZIP_ENABLE_BZIP2) 61endif(MINIZIP_ENABLE_BZIP2)
@@ -89,10 +101,6 @@ check_c_source_compiles(
89 101
90unset(CMAKE_REQUIRED_FLAGS) 102unset(CMAKE_REQUIRED_FLAGS)
91 103
92if(NOT TARGET ZLIB::ZLIB)
93 find_package(ZLIB REQUIRED CONFIG)
94endif(NOT TARGET ZLIB::ZLIB)
95
96set(LIBMINIZIP_SRCS ioapi.c mztools.c unzip.c zip.c) 104set(LIBMINIZIP_SRCS ioapi.c mztools.c unzip.c zip.c)
97 105
98set(LIBMINIZIP_HDRS crypt.h ints.h ioapi.h mztools.h unzip.h zip.h) 106set(LIBMINIZIP_HDRS crypt.h ints.h ioapi.h mztools.h unzip.h zip.h)