On 2026/05/20 4:53, Evgeny Kotkov wrote:
>> Proposed patch, vcxproj-zlib.diff, attached.
>>
> - # Different build options produce different library names :(
> - if os.path.exists(os.path.join(lib_path, 'zlibstatic.lib')):
> - # CMake default: zlibstatic.lib (static) and zlib.lib (dll)
> - lib_name = 'zlibstatic.lib'
> - elif os.path.exists(os.path.join(lib_path, 'zlibstat.lib')):
> - # Visual Studio project file default: zlibstat.lib (static)
> - # and zlibwapi.lib (dll)
> - lib_name = 'zlibstat.lib'
> - else:
> - # Standard makefile produces zlib.lib (static) and zdll.lib (dll)
> - lib_name = 'zlib.lib'
>
> + # Different versions and build options produce different library
> + # names :(
> + for name in (
> + 'z.lib', # >= 1.3.2 (shared)
> + 'zs.lib', # >= 1.3.2 (static)
> + 'zlibstatic.lib', # < 1.3.2 (cmake default)
> + 'zlibstat.lib', # < 1.3.2 (Visual Studio default)
> + 'zlib.lib', # < 1.3.2 (Standard makefile)
> + ):
> + if os.path.exists(os.path.join(lib_path, name)):
> + lib_name = name
> + break
> debug_lib_name = None
>
> It looks like the original code used to fall back to a default value of
> lib_name = 'zlib.lib' even if it doesn't exist on disk. I'm not sure
> if this was intended or not, but from the perspective of this patch,
> shouldn't we keep that fallback behavior unchanged?
Thanks for the reviewing! Agreed to keeping the fallback behavior.
Revised the proposed patch, vcxproj-zlib-v2.diff, attached.
--
Jun Omae <[email protected]> (大前 潤)
diff -upr subversion-1.15.0-rc2.orig/build/generator/gen_win_dependencies.py
subversion-1.15.0-rc2/build/generator/gen_win_dependencies.py
--- subversion-1.15.0-rc2.orig/build/generator/gen_win_dependencies.py
2025-12-16 02:00:11.000000000 +0900
+++ subversion-1.15.0-rc2/build/generator/gen_win_dependencies.py
2026-05-20 11:49:57.570943600 +0900
@@ -752,16 +752,18 @@ class GenDependenciesBase(gen_base.Gener
inc_path = os.path.join(self.zlib_path, 'include')
lib_path = os.path.join(self.zlib_path, 'lib')
- # Different build options produce different library names :(
- if os.path.exists(os.path.join(lib_path, 'zlibstatic.lib')):
- # CMake default: zlibstatic.lib (static) and zlib.lib (dll)
- lib_name = 'zlibstatic.lib'
- elif os.path.exists(os.path.join(lib_path, 'zlibstat.lib')):
- # Visual Studio project file default: zlibstat.lib (static) and
zlibwapi.lib (dll)
- lib_name = 'zlibstat.lib'
+ # Different versions and build options produce different library names :(
+ for name in (
+ 'z.lib', # >= 1.3.2 (shared)
+ 'zs.lib', # >= 1.3.2 (static)
+ 'zlibstatic.lib', # < 1.3.2 (cmake default)
+ 'zlibstat.lib', # < 1.3.2 (Visual Studio default)
+ ):
+ if os.path.exists(os.path.join(lib_path, name)):
+ lib_name = name
+ break
else:
- # Standard makefile produces zlib.lib (static) and zdll.lib (dll)
- lib_name = 'zlib.lib'
+ lib_name = 'zlib.lib' # < 1.3.2 (Standard makefile; fallback)
debug_lib_name = None
else:
# We have a source location