--- zlib-ng-2.2.4/CMakeLists.txt.orig	2025-07-12 11:02:40.564249200 +0200
+++ zlib-ng-2.2.4/CMakeLists.txt	2025-07-12 11:02:43.322005400 +0200
@@ -1198,7 +1198,7 @@
         "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
 endforeach()
 
-if(WIN32)
+if(WIN32 AND NOT MINGW)
     # Shared library
     if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
         set_target_properties(zlib PROPERTIES OUTPUT_NAME zlib${SUFFIX})
@@ -1260,6 +1260,9 @@
     elseif(WIN32)
         # Creates zlib1.dll when building shared library version
         if(ZLIB_COMPAT)
+            set_target_properties(zlib PROPERTIES OUTPUT_NAME "zlib")
+            set_target_properties(zlib PROPERTIES PREFIX "")
+            set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME "z")
             set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
         else()
             set_target_properties(zlib PROPERTIES SUFFIX "2.dll")
