Don't specify --version-script on Apple platforms in CMakeLists.txt.

Mac OS X's linker (derived from LLVM, not GNU binutils) does not support
--version-script. Don't specify it on this platform.
pull/40/head
Will Glynn 12 years ago committed by Mark Adler
parent bb97bc9d50
commit 27b7723222
  1. 4
      CMakeLists.txt

@ -166,7 +166,9 @@ endif()
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
elseif(BUILD_SHARED_LIBS AND WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")

Loading…
Cancel
Save