winbuild: improve check for static zlib

- Check for zlib static library name zlibstatic.lib.

zlib's static library has a different name depending on how it was
built. zlibstatic.lib is output by cmake. zlibstat.lib is output by
their pre-generated Visual Studio project files (in the contrib
directory) and defines ZLIB_WINAPI (ie it's meant to use stdcall
instead of cdecl if you end up exporting the zlib functions).

Prior to this change the makefile only checked for the latter.

Closes https://github.com/curl/curl/pull/11521
This commit is contained in:
wangzhikun 2023-07-28 11:00:06 +08:00 committed by Jay Satiro
parent 756c6a02ba
commit 7bfb10c180

View File

@ -265,6 +265,8 @@ ZLIB = dll
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib")
ZLIB_LIBS = zlibstat.lib
ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlibstatic.lib")
ZLIB_LIBS = zlibstatic.lib
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlib.lib")
ZLIB_LIBS = zlib.lib
!ELSE