Jun Omae <[email protected]> writes:
> It is caused by zlib.lib has been renamed to z.lib in zlib 1.3.2.
Good catch!
> 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,
Evgeny Kotkov