summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/mingw_make.cpp
diff options
context:
space:
mode:
authorM. Moellney <mail@michaelmoellney.de>2015-05-27 22:31:21 +0200
committerMichael Möllney <mail@michaelmoellney.de>2015-06-02 03:37:07 +0000
commitd83bd9c6f5abd936b853029bf7030ebb4792f9fb (patch)
treec714619ac3213ee7e2d6122c7947ed2f2b1c03b5 /qmake/generators/win32/mingw_make.cpp
parente1b366a89c719c833bfd78d432988e3c14557e00 (diff)
Introduce qmake RC_DEFINES for RC preprocessor defines
qmake win32 generators by default used values of DEFINES for RC preprocessor defines, too. For simple defines this works. For string literals this failed for the .vcxproj files: DEFINES += "FOO=\"BAR BAR\"" works for CL but fails for RC. DEFINES += "FOO=\\\"BAR BAR\\\"" works for RC but fails for CL. This patch introduces the qmake variable RC_DEFINES. The variable contains the preprocessor defines, that are used for RC. If the varible is not set, the DEFINES values are used for RC. Task-number: QTBUG-44184 Change-Id: I4202271759d29de8c1829347ae3ef117eda54b38 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake/generators/win32/mingw_make.cpp')
-rw-r--r--qmake/generators/win32/mingw_make.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index c19e17bc0e..57955dc456 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -405,9 +405,14 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
}
if (!rc_file.isEmpty()) {
+
+ ProString defines = varGlue("RC_DEFINES", " -D", " -D", "");
+ if (defines.isEmpty())
+ defines = ProString(" $(DEFINES)");
+
t << escapeDependencyPath(var("RES_FILE")) << ": " << escapeDependencyPath(rc_file) << "\n\t"
<< var("QMAKE_RC") << " -i " << escapeFilePath(rc_file) << " -o " << fileVar("RES_FILE")
- << incPathStr << " $(DEFINES)\n\n";
+ << incPathStr << defines << "\n\n";
}
}