From 6f580d6a5ae9cb553aa8486499af35a46406c4c6 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 3 Aug 2012 19:35:54 +0200 Subject: [PATCH] Fix qmake -project qmake -project was always outputting a project with subdirs template, because Option::h_moc_mod was not being properly read, causing addFile() to misbehave. Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886 Reviewed-by: Oswald Buddenhagen --- qmake/generators/projectgenerator.cpp | 1 + qmake/project.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 1e5bab6..16d1c71 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -78,6 +78,7 @@ ProjectGenerator::init() project->read(QMakeProject::ReadFeatures); project->values("CONFIG").clear(); + Option::postProcessProject(project); QHash &v = project->variables(); QString templ = Option::user_template.isEmpty() ? QString("app") : Option::user_template; diff --git a/qmake/project.cpp b/qmake/project.cpp index 61140e9..3379f45 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1518,6 +1518,12 @@ QMakeProject::read(uchar cmd) vars = base_vars; // start with the base } setupProject(); + } else if (cmd & ReadFeatures) { + // Even when ReadSetup is not set, but ReadFeatures is, + // we still need to process spec_pre.prf to load some + // default values and other settings. + debug_msg(1, "Processing spec_pre (but skipping actual spec): %s", vars["CONFIG"].join("::").toLatin1().constData()); + doProjectInclude("spec_pre", IncludeFlagFeature, vars); } for (QHash::ConstIterator it = extra_vars.constBegin(); -- 2.7.4