CMake: Name the shared library cygz.dll on Cygwin.

pull/1039/head
Vollstrecker 3 months ago committed by Mark Adler
parent 494830e2df
commit e0b78cea4f
  1. 19
      CMakeLists.txt

@ -113,19 +113,18 @@ if(ZLIB_BUILD_SHARED)
$<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO> $<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE> $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>) $<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>)
# The VERSION property causes shared libraries on Linux to have the full version set(INSTALL_VERSION ${zlib_VERSION_MAJOR})
# encoded into their final filename. We disable this on Cygwin because
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll if(NOT CYGWIN)
# seems to be the default. set_target_properties(zlib PROPERTIES
# SOVERSION ${zlib_VERSION_MAJOR}
# This has no effect with MSVC, on that platform the version info for VERSION ${INSTALL_VERSION})
# the DLL comes from the resource file win32/zlib1.rc endif(NOT CYGWIN)
set_target_properties(zlib PROPERTIES set_target_properties(zlib PROPERTIES
DEFINE_SYMBOL ZLIB_DLL DEFINE_SYMBOL ZLIB_DLL
EXPORT_NAME ZLIB EXPORT_NAME ZLIB
OUTPUT_NAME z OUTPUT_NAME z)
SOVERSION 1
$<$<BOOL:NOT:$CYGWIN}>:VERSION ${zlib_VERSION}>)
if(UNIX AND NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) if(UNIX AND NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX))
# On unix-like platforms the library is almost always called libz # On unix-like platforms the library is almost always called libz
set_target_properties(zlib PROPERTIES set_target_properties(zlib PROPERTIES

Loading…
Cancel
Save