mirror of
https://github.com/curl/curl.git
synced 2026-07-25 23:27:16 +03:00
winbuild: conditionally use /DZLIB_WINAPI
zlibwapi.lib (dynamic library) and zlibstat.lib (static library) have the ZLIB_WINAPI define set by default. Using them requires that define too. Ref: https://zlib.net/DLL_FAQ.txt Fixes https://github.com/curl/curl/issues/3133 Closes https://github.com/curl/curl/pull/3460
This commit is contained in:
parent
d8852d0868
commit
07367e717a
1 changed files with 3 additions and 1 deletions
|
|
@ -239,6 +239,7 @@ ZLIB_LIB_DIR = $(DEVEL_LIB)
|
|||
!IF "$(WITH_ZLIB)"=="dll"
|
||||
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibwapi.lib")
|
||||
ZLIB_LIBS = zlibwapi.lib
|
||||
ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI
|
||||
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zdll.lib")
|
||||
ZLIB_LIBS = zdll.lib
|
||||
!ELSE
|
||||
|
|
@ -249,6 +250,7 @@ ZLIB = dll
|
|||
!ELSEIF "$(WITH_ZLIB)"=="static"
|
||||
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib")
|
||||
ZLIB_LIBS = zlibstat.lib
|
||||
ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI
|
||||
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlib.lib")
|
||||
ZLIB_LIBS = zlib.lib
|
||||
!ELSE
|
||||
|
|
@ -259,7 +261,7 @@ ZLIB = static
|
|||
!ENDIF
|
||||
|
||||
!IFDEF USE_ZLIB
|
||||
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I"$(ZLIB_INC_DIR)"
|
||||
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ $(ADDITIONAL_ZLIB_CFLAGS) /I"$(ZLIB_INC_DIR)"
|
||||
!ENDIF
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue