zlib should build on nonwindows now

This commit is contained in:
DaniTheSkunk 2022-12-21 06:13:00 +00:00
parent 1054c18ba9
commit 9eb09be03b
1 changed files with 5 additions and 4 deletions

View File

@ -165,10 +165,11 @@ endif()
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
#set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
#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")