summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-01-07 07:09:01 (GMT)
committeraxis <qt-info@nokia.com>2011-01-28 12:25:04 (GMT)
commit21f2e2330f788543e3ba97eeec50885150d45397 (patch)
treef8c87683a88426dd452b1d2c045ad4ab391633b2 /qmake/generators/win32
parent5c88141ed0b25d8ab9318bf4cb5dda54b90b2ce1 (diff)
downloadQt-21f2e2330f788543e3ba97eeec50885150d45397.zip
Qt-21f2e2330f788543e3ba97eeec50885150d45397.tar.gz
Qt-21f2e2330f788543e3ba97eeec50885150d45397.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/generators/win32')
-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 a42b97d..8530825 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -343,6 +343,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()