summaryrefslogtreecommitdiffstats
path: root/qmake/generators/mac/pbuilder_pbx.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-09-19 13:10:33 +0200
committerRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-09-20 18:21:45 +0200
commit4d8dd7f673d874607eb23c0dc36bb7c24324aa4f (patch)
tree391413d5b453c3e9ddc62c8ed9fad36b4e4a24f8 /qmake/generators/mac/pbuilder_pbx.cpp
parentdbd400b93726c1922cb9f1d9e74732b679d57586 (diff)
Xcode generator: always create 'Copy Bundle Resources' phase
If creating an asset catalog from Xcode, Xcode will add it to the "Copy Bundle Reources" phase, if it exists. Since we don't always generate that phase, Xcode will silently fail with the result that the asset catalog will not take effect (no icon, launch images etc). This patch will ensure that we always create the phase (like native Xcode project does), which will fix the problem. Change-Id: Ief949d63543977f1021db992e0c41714d898e68b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'qmake/generators/mac/pbuilder_pbx.cpp')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 15397762ab..418019405c 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1183,17 +1183,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
bundle_resources_files += keyFor(icon + ".BUILDABLE");
}
- if (!bundle_resources_files.isEmpty()) {
- QString grp("Copy Bundle Resources"), key = keyFor(grp);
- project->values("QMAKE_PBX_BUILDPHASES").append(key);
- t << "\t\t" << key << " = {\n"
- << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
- << "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n"
- << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n"
- << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
- << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
- << "\t\t};\n";
- }
+ // Always add "Copy Bundle Resources" phase, even when we have no bundle
+ // resources, since Xcode depends on it being there for e.g asset catalogs.
+ QString grp("Copy Bundle Resources"), key = keyFor(grp);
+ project->values("QMAKE_PBX_BUILDPHASES").append(key);
+ t << "\t\t" << key << " = {\n"
+ << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";\n"
+ << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";\n"
+ << "\t\t};\n";
}
//REFERENCE