diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-09-25 16:48:44 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-10-01 10:56:33 +0200 |
commit | 59e8d430e9b8ff270246b64c1096f50151d32ec8 (patch) | |
tree | fb82327b5d214d0434125abd3f1425461bdc915e /qmake | |
parent | 4849037851b210507df63eb4aed7e467c834be62 (diff) |
centralize bundle_dir calculation
Change-Id: I353fb4eafc014bccdec71af42f8625b33488ae0d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 77170c3e89..d900d28144 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -703,9 +703,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if (!project->isEmpty("QMAKE_BUNDLE")) { + QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; if (!project->first("QMAKE_PKGINFO").isEmpty()) { ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents"; + QString destdir = bundle_dir + "Contents"; t << pkginfo << ": \n\t"; if (!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; @@ -718,7 +719,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); bundledFiles << resources; - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources"; + QString destdir = bundle_dir + "Contents/Resources"; t << resources << ": \n\t"; t << mkdir_p_asstring(destdir) << "\n\t"; t << "@touch " << resources << "\n\t\n"; @@ -760,7 +761,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "" << info_plist << " >" << info_plist_out << endl; //copy the icon if(!project->isEmpty("ICON")) { - QString dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources/"; + QString dir = bundle_dir + "Contents/Resources/"; const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1)); bundledFiles << icon_path; t << icon_path << ": " << icon << "\n\t" @@ -781,7 +782,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } //copy other data if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { - QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA"); for(int i = 0; i < bundle_data.count(); i++) { const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files")); |