diff options
| author | Vollstrecker <github@vollstreckernet.de> | 2026-02-14 23:54:26 +0100 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-02-16 01:57:40 -0800 |
| commit | 965fbb574f2d2117329ed7e48536cae1012ce672 (patch) | |
| tree | 74a15a988df555fc88e7a5f10d5570159583935c | |
| parent | f4f34491eaa63a6493098251971f5dd28819b133 (diff) | |
| download | zlib-965fbb574f2d2117329ed7e48536cae1012ce672.tar.gz zlib-965fbb574f2d2117329ed7e48536cae1012ce672.tar.bz2 zlib-965fbb574f2d2117329ed7e48536cae1012ce672.zip | |
CMake: Remove "compatible" zlib and minizip installations.
Replaced with zlib1-dll.
| -rw-r--r-- | CMakeLists.txt | 19 | ||||
| -rw-r--r-- | README-cmake.md | 4 | ||||
| -rw-r--r-- | contrib/minizip/CMakeLists.txt | 13 |
3 files changed, 1 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b31303e..71615168 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -27,10 +27,6 @@ option(ZLIB_PREFIX "prefix for all types and library functions, see zconf.h.in" | |||
| 27 | OFF) | 27 | OFF) |
| 28 | mark_as_advanced(ZLIB_PREFIX) | 28 | mark_as_advanced(ZLIB_PREFIX) |
| 29 | 29 | ||
| 30 | if(WIN32) | ||
| 31 | option(ZLIB_INSTALL_COMPAT_DLL "Install a copy as zlib1.dll" ON) | ||
| 32 | endif(WIN32) | ||
| 33 | |||
| 34 | get_property(IS_MULTI GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | 30 | get_property(IS_MULTI GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) |
| 35 | 31 | ||
| 36 | if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI) | 32 | if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI) |
| @@ -240,13 +236,6 @@ if(ZLIB_INSTALL) | |||
| 240 | FILE ZLIB-shared.cmake | 236 | FILE ZLIB-shared.cmake |
| 241 | NAMESPACE ZLIB:: | 237 | NAMESPACE ZLIB:: |
| 242 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib) | 238 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib) |
| 243 | if(ZLIB_INSTALL_COMPAT_DLL) | ||
| 244 | install( | ||
| 245 | FILES $<TARGET_FILE:zlib> | ||
| 246 | COMPONENT Development | ||
| 247 | RENAME zlib1.dll | ||
| 248 | DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
| 249 | endif(ZLIB_INSTALL_COMPAT_DLL) | ||
| 250 | 239 | ||
| 251 | if(MSVC) | 240 | if(MSVC) |
| 252 | install( | 241 | install( |
| @@ -271,14 +260,6 @@ if(ZLIB_INSTALL) | |||
| 271 | FILE ZLIB-static.cmake | 260 | FILE ZLIB-static.cmake |
| 272 | NAMESPACE ZLIB:: | 261 | NAMESPACE ZLIB:: |
| 273 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib) | 262 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib) |
| 274 | |||
| 275 | if(ZLIB_INSTALL_COMPAT_DLL AND MINGW) | ||
| 276 | install( | ||
| 277 | FILES $<TARGET_FILE:zlibstatic> | ||
| 278 | COMPONENT Development | ||
| 279 | RENAME libz.dll.a | ||
| 280 | DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| 281 | endif(ZLIB_INSTALL_COMPAT_DLL AND MINGW) | ||
| 282 | endif(ZLIB_BUILD_STATIC) | 263 | endif(ZLIB_BUILD_STATIC) |
| 283 | 264 | ||
| 284 | configure_package_config_file( | 265 | configure_package_config_file( |
diff --git a/README-cmake.md b/README-cmake.md index c81c242c..5f276415 100644 --- a/README-cmake.md +++ b/README-cmake.md | |||
| @@ -25,8 +25,6 @@ If this option is turned on, additional options are available from minizip (see | |||
| 25 | 25 | ||
| 26 | ZLIB_PREFIX=OFF -- prefix for all types and library functions, see zconf.h.in | 26 | ZLIB_PREFIX=OFF -- prefix for all types and library functions, see zconf.h.in |
| 27 | 27 | ||
| 28 | ZLIB_INSTALL_COMPAT_DLL=ON -- Install a copy as zlib1.dll | ||
| 29 | |||
| 30 | This option is only on windows available and may/will be turned off and removed somewhen in the future. | 28 | This option is only on windows available and may/will be turned off and removed somewhen in the future. |
| 31 | If you rely cmake for finding and using zlib, this can be turned off, as `zlib1.dll` will never be used. | 29 | If you rely cmake for finding and using zlib, this can be turned off, as `zlib1.dll` will never be used. |
| 32 | 30 | ||
| @@ -44,8 +42,6 @@ A usable installation of bzip2 is needed or config will fail. Turn this option o | |||
| 44 | 42 | ||
| 45 | MINIZIP_INSTALL=ON -- Enable installation of minizip | 43 | MINIZIP_INSTALL=ON -- Enable installation of minizip |
| 46 | 44 | ||
| 47 | MINIZIP_INSTALL_COMPAT_DLL=ON -- Install a copy as libminizip-1.dll | ||
| 48 | |||
| 49 | This option is only available on mingw as they tend to name this lib different. Maybe this will also be | 45 | This option is only available on mingw as they tend to name this lib different. Maybe this will also be |
| 50 | removed in the future as. If you rely cmake for finding and using zlib, this can be turned off, as | 46 | removed in the future as. If you rely cmake for finding and using zlib, this can be turned off, as |
| 51 | the other file will never be used. | 47 | the other file will never be used. |
diff --git a/contrib/minizip/CMakeLists.txt b/contrib/minizip/CMakeLists.txt index fe357df2..e394a6cf 100644 --- a/contrib/minizip/CMakeLists.txt +++ b/contrib/minizip/CMakeLists.txt | |||
| @@ -36,13 +36,9 @@ endif(ZLIB_BUILD_MINIZIP) | |||
| 36 | option(MINIZIP_BUILD_SHARED "Enable building minizip shared library" ON) | 36 | option(MINIZIP_BUILD_SHARED "Enable building minizip shared library" ON) |
| 37 | option(MINIZIP_BUILD_STATIC "Enable building minizip static library" ON) | 37 | option(MINIZIP_BUILD_STATIC "Enable building minizip static library" ON) |
| 38 | option(MINIZIP_BUILD_TESTING "Enable testing of minizip" ON) | 38 | option(MINIZIP_BUILD_TESTING "Enable testing of minizip" ON) |
| 39 | option(MINIZIP_ENABLE_BZIP2 "Build minizip withj bzip2 support" ON) | 39 | option(MINIZIP_ENABLE_BZIP2 "Build minizip with bzip2 support" ON) |
| 40 | option(MINIZIP_INSTALL "Enable installation of minizip" ON) | 40 | option(MINIZIP_INSTALL "Enable installation of minizip" ON) |
| 41 | 41 | ||
| 42 | if(MINGW) | ||
| 43 | option(MINIZIP_INSTALL_COMPAT_DLL "Install a copy as libminizip-1.dll" ON) | ||
| 44 | endif(MINGW) | ||
| 45 | |||
| 46 | include(CheckCSourceCompiles) | 42 | include(CheckCSourceCompiles) |
| 47 | include(CheckFunctionExists) | 43 | include(CheckFunctionExists) |
| 48 | include(CheckIncludeFile) | 44 | include(CheckIncludeFile) |
| @@ -235,13 +231,6 @@ if(MINIZIP_INSTALL) | |||
| 235 | FILE minizip-shared.cmake | 231 | FILE minizip-shared.cmake |
| 236 | NAMESPACE MINIZIP:: | 232 | NAMESPACE MINIZIP:: |
| 237 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/minizip) | 233 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/minizip) |
| 238 | if(MINIZIP_INSTALL_COMPAT_DLL) | ||
| 239 | install( | ||
| 240 | FILES $<TARGET_FILE:libminizip> | ||
| 241 | COMPONENT Runtime | ||
| 242 | RENAME libminizip-${minizip_VERSION_MAJOR}.dll | ||
| 243 | DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
| 244 | endif(MINIZIP_INSTALL_COMPAT_DLL) | ||
| 245 | 234 | ||
| 246 | if(MSVC) | 235 | if(MSVC) |
| 247 | install( | 236 | install( |
