-
Rocky Automation authoredRocky Automation authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
mingw-zlib-cmake.patch 975 B
diff -rupN --no-dereference zlib-1.2.13/CMakeLists.txt zlib-1.2.13-new/CMakeLists.txt
--- zlib-1.2.13/CMakeLists.txt 2022-10-13 07:06:55.000000000 +0200
+++ zlib-1.2.13-new/CMakeLists.txt 2022-12-13 09:35:24.752040574 +0100
@@ -163,12 +163,16 @@ if(NOT CYGWIN)
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
endif()
-if(UNIX)
+if(UNIX OR MINGW)
# 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()
+ if(MINGW)
+ set_target_properties(zlib PROPERTIES PREFIX "")
+ set_target_properties(zlib PROPERTIES RUNTIME_OUTPUT_NAME "zlib1")
+ endif()
elseif(BUILD_SHARED_LIBS AND WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")