summaryrefslogtreecommitdiff
path: root/winbuild
diff options
context:
space:
mode:
authorapique <apique@PC42.isdom.isoft.fr>2019-09-09 17:06:15 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-04 11:29:08 +0200
commit1d7fe8390f01295e725be3b9e6840e4828da07e2 (patch)
treefd39918de6f759b7ff11cc7ba927b9a91b5032bc /winbuild
parentb902b0632d82945636d53bec325645540c4926a6 (diff)
downloadcurl-1d7fe8390f01295e725be3b9e6840e4828da07e2.tar.gz
winbuild: add ENABLE_UNICODE option
Fixes https://github.com/curl/curl/issues/4308 Closes https://github.com/curl/curl/pull/4309
Diffstat (limited to 'winbuild')
-rw-r--r--winbuild/Makefile.vc10
-rw-r--r--winbuild/MakefileBuild.vc4
2 files changed, 14 insertions, 0 deletions
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index 9b3b35513..7ad49f09f 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -59,6 +59,7 @@ CFGSET=true
!MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
!MESSAGE ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes or no>
!MESSAGE - Whether the OpenSSL configuration will be loaded automatically, defaults to yes
+!MESSAGE ENABLE_UNICODE=<yes or no> - Enable UNICODE support, defaults to no
!MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
!MESSAGE DEBUG=<yes or no> - Debug builds
!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
@@ -146,6 +147,14 @@ ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true
ENABLE_OPENSSL_AUTO_LOAD_CONFIG = false
!ENDIF
+!IFNDEF ENABLE_UNICODE
+USE_UNICODE = false
+!ELSEIF "$(ENABLE_UNICODE)"=="yes"
+USE_UNICODE = true
+!ELSEIF "$(ENABLE_UNICODE)"=="no"
+USE_UNICODE = false
+!ENDIF
+
CONFIG_NAME_LIB = libcurl
!IF "$(WITH_SSL)"=="dll"
@@ -277,6 +286,7 @@ $(MODE):
@SET USE_IPV6=$(USE_IPV6)
@SET USE_SSPI=$(USE_SSPI)
@SET USE_WINSSL=$(USE_WINSSL)
+ @SET USE_UNICODE=$(USE_UNICODE)
# compatibility bit
@SET WITH_NGHTTP2=$(WITH_NGHTTP2)
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index 5cc16501b..8267250c2 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -485,6 +485,10 @@ LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
CFLAGS = $(CFLAGS) /DCURL_WITH_MULTI_SSL
!ENDIF
+!IF "$(USE_UNICODE)"=="true"
+CFLAGS = $(CFLAGS) /DUNICODE /D_UNICODE
+!ENDIF
+
LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl