From: andrew_ishchuk Date: Mon, 9 Dec 2019 11:00:20 +0000 (+0500) Subject: winbuild: Define CARES_STATICLIB when WITH_CARES=static X-Git-Tag: curl-7_68_0~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=476a8320945243c80bdf3b161232511442d8dc49;p=thirdparty%2Fcurl.git winbuild: Define CARES_STATICLIB when WITH_CARES=static When libcurl is built with MODE=static, c-ares is forced into static linkage too. That doesn't happen when MODE=dll so linker would break over undefined symbols. closes https://github.com/curl/curl/pull/4688 --- diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index 6f34257c5f..4e39be66f1 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -222,6 +222,9 @@ CARES = static !IFDEF USE_CARES CARES_CFLAGS = /DUSE_ARES /I"$(CARES_INC_DIR)" +!IF "$(CARES)"=="static" +CARES_CFLAGS = $(CARES_CFLAGS) /DCARES_STATICLIB +!ENDIF !ENDIF