summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-26 17:13:54 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-03-01 11:07:17 +0200
commit3d50a8049b20e01b8a2cb9b954b14302dc6144c6 (patch)
tree80f65aef23c0aa17055fbe86ef1d174bb3f02e34 /qmake
parent8113f2d94afd4e25caf12edf9716b7e0a82de1a8 (diff)
Added .condition modifier to SUBDIRS.
In Symbian, it is now possible to set certain subdirs to be built only when specified define is true when bld.inf is parsed. For example, compile a subdir only when building for emulator: SUBDIRS += winscw_lib winscw_lib.condition = WINSCW Also improved SUBDIRS variable documentation; the modifiers were completely undocumented. Task-number: QT-3017 Reviewed-by: axis
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symmake.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index b5a069631f..9ade6991e2 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -1317,6 +1317,10 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
fixedItem = item;
}
+ QString condition;
+ if (!project->isEmpty(item + ".condition"))
+ condition = project->first(item + ".condition");
+
QFileInfo subdir(fileInfo(fixedItem));
QString relativePath = directory.relativeFilePath(fixedItem);
QString subdirFileName = subdir.completeBaseName();
@@ -1345,9 +1349,16 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
bldinfDefine = bldinfDefine.toUpper();
removeSpecialCharacters(bldinfDefine);
+ if (!condition.isEmpty())
+ t << "#if defined(" << condition << ")" << endl;
+
t << "#ifndef " << bldinfDefine << endl;
t << "\t#include \"" << bldinfFilename << "\"" << endl;
- t << "#endif // " << bldinfDefine << endl;
+ t << "#endif" << endl;
+
+ if (!condition.isEmpty())
+ t << "#endif" << endl;
+
}
// Add supported project platforms