diff options
author | Miguel Costa <miguel.costa@qt.io> | 2019-10-07 17:47:36 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-10-10 13:14:15 +0000 |
commit | 907c13e156613d28accd8c7812f9c561bfff36a6 (patch) | |
tree | 084de43cea6959ceda26efa9ce7b51f12ad9729f | |
parent | f6caa53b79a4700303eace87062eb29489a59020 (diff) |
Remove Unicode macros when using multi-byte char set
When calling qmake to get the pre-processor macros needed for the build,
exclude UNICODE and _UNICODE if the CharacterSet property is set to
'multi-byte'. qmake always includes these macros by default. Excluding
them in this case will ensure the multi-byte version of Windows API
functions is used.
Task-number: QTVSADDINBUG-670
Change-Id: I7e766c43a25359f9c66672621fc537027b144193
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/qtmsbuild/qt_vars.targets | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qtmsbuild/qt_vars.targets b/src/qtmsbuild/qt_vars.targets index 7e61cbcf..c86c3656 100644 --- a/src/qtmsbuild/qt_vars.targets +++ b/src/qtmsbuild/qt_vars.targets @@ -157,6 +157,12 @@ $(QtVarsProFileInput) LIBS += $(QtLibs) </QtVarsProFileInput> + <!-- +# Undef UNICODE macro if project is configured with multi-byte char set --> + <QtVarsProFileInput Condition="'$(CharacterSet)' == 'MultiByte'"> + $(QtVarsProFileInput) + DEFINES -= UNICODE _UNICODE + </QtVarsProFileInput> <!--// Generate .pro file --> <!-- |