summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-01-07 07:09:01 (GMT)
committeraxis <qt-info@nokia.com>2011-03-04 10:44:02 (GMT)
commit7caa55505704cd907bbd19a2e79fb9e604a86675 (patch)
tree4ae19601dcc0e460c2e980a3efe6697b25c5da8e /qmake
parent85005fb1ee135b33ef2e97396d469112845f3e6c (diff)
downloadQt-7caa55505704cd907bbd19a2e79fb9e604a86675.zip
Qt-7caa55505704cd907bbd19a2e79fb9e604a86675.tar.gz
Qt-7caa55505704cd907bbd19a2e79fb9e604a86675.tar.bz2
Added support for various special compiler/linker flags on MinGW.
This enables you to use QMAKE_xxx_yyy, where xxx is either CFLAGS, CXXFLAGS or LFLAGS, and yyy is either APP, SHLIB or PLUGIN. It is basically the same as the one in the UNIX generator. RevBy: Oswald Buddenhagen
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/winmakefile.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index f2bf7d4..7f81b54 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -332,6 +332,24 @@ void Win32MakefileGenerator::processVars()
if(!(*libDir_it).isEmpty())
(*libDir_it) = Option::fixPathToTargetOS((*libDir_it), false, false);
}
+
+ if (project->values("TEMPLATE").contains("app")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_APP");
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_APP");
+ } else if (project->values("TEMPLATE").contains("lib") && project->isActiveConfig("dll")) {
+ if(!project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_SHLIB");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_SHLIB");
+ }
+ if (project->isActiveConfig("plugin")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
+ } else {
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
+ }
+ }
}
void Win32MakefileGenerator::fixTargetExt()