Generate dependencies for moc_ style includes when using CONFIG+=GNUmake
Sometimes you will include "moc_foo.cpp" from a a cpp file, not to tell qmake to run moc on it (that's handled by having foo.h in HEADERS), but so that the moc'ed sources are compiled as part of foo.cpp instead of a separate compilation unit, or if the moc'ed sources need defintions from the cpp file. The dependency logic for CONFIG+=GNUmake failed to take this case into account, resulting in failures to find files when generating dependency information for those files. Change-Id: Iac00424e2d196b518b1ef576d7567335b8ff24f0 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
ce5adc7684
commit
d74bb06079
@ -323,7 +323,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
if(!d_file.isEmpty()) {
|
||||
d_file = odir + ".deps/" + fileFixify(d_file, pwd, Option::output_dir) + ".d";
|
||||
QStringList deps = findDependencies((*it)).filter(QRegExp(Option::cpp_moc_ext + "$"));
|
||||
QStringList deps = findDependencies((*it)).filter(QRegExp(
|
||||
"((^|/)" + Option::h_moc_mod + "|" + Option::cpp_moc_ext + "$)"));
|
||||
if(!deps.isEmpty())
|
||||
t << d_file << ": " << deps.join(" ") << endl;
|
||||
t << "-include " << d_file << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user