diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-06-01 14:15:15 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-06-01 14:15:15 +0200 |
commit | 02c8fa204f53af27907ef48bc74c500d7a05c3a0 (patch) | |
tree | 56519f143a72884a47c757d96c411e26c10c8a10 /qmake | |
parent | 36e8cf3cdb50c0447695f35c2e63eed139704c13 (diff) | |
parent | 0a63d5fed6e020e81d3c570d299d1292c33fa284 (diff) |
Merge remote-tracking branch 'gerrit/5.11' into wip/webassembly
Change-Id: Ie6757dd81b49f4d9e677dbd08f5378d6190187b7
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 16 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 18 |
3 files changed, 37 insertions, 9 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 3b1f904253..18b62c5135 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1603,7 +1603,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } - t << "\t\t\t\t" << writeSettings("SYMROOT", Option::output_dir) << ";\n"; + // The symroot is marked by xcodebuild as excluded from Time Machine + // backups, as it's a temporary build dir, so we don't want it to be + // the same as the possibe in-source dir, as that would leave out + // sources from being backed up. + t << "\t\t\t\t" << writeSettings("SYMROOT", + Option::output_dir + Option::dir_sep + ".xcode") << ";\n"; + + // The configuration build dir however is not treated as excluded, + // so we can safely point it to the root output dir. + t << "\t\t\t\t" << writeSettings("CONFIGURATION_BUILD_DIR", + Option::output_dir + Option::dir_sep + "$(CONFIGURATION)") << ";\n"; if (!project->isEmpty("DESTDIR")) { ProString dir = project->first("DESTDIR"); diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 254cb1a1a7..55c3ae91d7 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1953,11 +1953,12 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } QT_PCLOSE(proc); if(!indeps.isEmpty()) { + QDir outDir(Option::output_dir); // ### This is basically fubar. Add 'lines' flag to CONFIG? QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { QString &file = dep_cmd_deps[i]; - QString absFile = QDir(Option::output_dir).absoluteFilePath(file); + QString absFile = outDir.absoluteFilePath(file); if (exists(absFile)) { file = absFile; } else { @@ -1965,8 +1966,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths(); for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin(); dit != depdirs.end(); ++dit) { - if (exists((*dit).local() + '/' + file)) { - localFile = (*dit).local() + '/' + file; + QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file); + if (exists(lf)) { + localFile = lf; break; } } @@ -2045,11 +2047,12 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } QT_PCLOSE(proc); if(!indeps.isEmpty()) { + QDir outDir(Option::output_dir); // ### This is basically fubar. Add 'lines' flag to CONFIG? QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { QString &file = dep_cmd_deps[i]; - QString absFile = QDir(Option::output_dir).absoluteFilePath(file); + QString absFile = outDir.absoluteFilePath(file); if (exists(absFile)) { file = absFile; } else { @@ -2057,8 +2060,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths(); for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin(); dit != depdirs.end(); ++dit) { - if (exists((*dit).local() + '/' + file)) { - localFile = (*dit).local() + '/' + file; + QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file); + if (exists(lf)) { + localFile = lf; break; } } diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 30f99174f8..894020d2bd 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -461,10 +461,24 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) opt = (*++it).toQString(); else opt = opt.mid(10).trimmed(); + static const QChar suffixMarker = ','; + const int suffixPosition = opt.indexOf(suffixMarker); + const bool hasSuffix = suffixPosition >= 0; + QString frameworkName = opt; + if (hasSuffix) { + frameworkName.truncate(suffixPosition); + opt.remove(suffixMarker); // Apply suffix by removing marker + } for (const QMakeLocalFileName &dir : qAsConst(frameworkdirs)) { - QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext; - if (processPrlFile(prl)) + QString frameworkDirectory = dir.local() + "/" + frameworkName + + ".framework/"; + QString suffixedPrl = frameworkDirectory + opt + Option::prl_ext; + if (processPrlFile(suffixedPrl)) break; + if (hasSuffix) { + QString unsuffixedPrl = frameworkDirectory + frameworkName + Option::prl_ext; + if (processPrlFile(unsuffixedPrl)) + break; + } } } else { if (opt.length() == 10) |