diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2024-12-05 12:31:33 +0100 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2025-01-31 19:59:10 -0800 |
| commit | e0b78cea4f5e526da33eeebfaa0d06a6fcd70aee (patch) | |
| tree | ddf55be1920a38a9ee6dd3a97519428043def4aa | |
| parent | 494830e2dfcff18f014abc2b289d6b83ddc8c222 (diff) | |
| download | zlib-e0b78cea4f5e526da33eeebfaa0d06a6fcd70aee.tar.gz zlib-e0b78cea4f5e526da33eeebfaa0d06a6fcd70aee.tar.bz2 zlib-e0b78cea4f5e526da33eeebfaa0d06a6fcd70aee.zip | |
CMake: Name the shared library cygz.dll on Cygwin.
| -rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 545dafe..4aaf62b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -113,19 +113,18 @@ if(ZLIB_BUILD_SHARED) | |||
| 113 | $<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO> | 113 | $<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO> |
| 114 | $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE> | 114 | $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE> |
| 115 | $<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>) | 115 | $<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>) |
| 116 | # The VERSION property causes shared libraries on Linux to have the full version | 116 | set(INSTALL_VERSION ${zlib_VERSION_MAJOR}) |
| 117 | # encoded into their final filename. We disable this on Cygwin because | 117 | |
| 118 | # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll | 118 | if(NOT CYGWIN) |
| 119 | # seems to be the default. | 119 | set_target_properties(zlib PROPERTIES |
| 120 | # | 120 | SOVERSION ${zlib_VERSION_MAJOR} |
| 121 | # This has no effect with MSVC, on that platform the version info for | 121 | VERSION ${INSTALL_VERSION}) |
| 122 | # the DLL comes from the resource file win32/zlib1.rc | 122 | endif(NOT CYGWIN) |
| 123 | |||
| 123 | set_target_properties(zlib PROPERTIES | 124 | set_target_properties(zlib PROPERTIES |
| 124 | DEFINE_SYMBOL ZLIB_DLL | 125 | DEFINE_SYMBOL ZLIB_DLL |
| 125 | EXPORT_NAME ZLIB | 126 | EXPORT_NAME ZLIB |
| 126 | OUTPUT_NAME z | 127 | OUTPUT_NAME z) |
| 127 | SOVERSION 1 | ||
| 128 | $<$<BOOL:NOT:$CYGWIN}>:VERSION ${zlib_VERSION}>) | ||
| 129 | if(UNIX AND NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) | 128 | if(UNIX AND NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) |
| 130 | # On unix-like platforms the library is almost always called libz | 129 | # On unix-like platforms the library is almost always called libz |
| 131 | set_target_properties(zlib PROPERTIES | 130 | set_target_properties(zlib PROPERTIES |
