aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2015-04-04 18:43:42 +0200
committerEinar Johan Trøan Sømåen2015-04-09 20:02:16 +0200
commitf8b054621a08925f716e2468070911c9100acb0a (patch)
tree9c18897cec570d0916dffa66e95bd5cba7dd1393
parent8af5d6e72208e96930f37f6442de71a81e8019cc (diff)
downloadscummvm-rg350-f8b054621a08925f716e2468070911c9100acb0a.tar.gz
scummvm-rg350-f8b054621a08925f716e2468070911c9100acb0a.tar.bz2
scummvm-rg350-f8b054621a08925f716e2468070911c9100acb0a.zip
CREATE_PROJECT: Implement setupSourcesBuildPhase for XCode, basing it on setupResourcesBuildPhase.
-rw-r--r--devtools/create_project/xcode.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 4e651072b1..590fee3af4 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -538,7 +538,36 @@ void XCodeProvider::setupResourcesBuildPhase() {
}
void XCodeProvider::setupSourcesBuildPhase() {
- // TODO
+ _sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
+
+ // Setup source file properties
+ std::map<std::string, FileProperty> properties;
+
+ // Same as for containers: a rule for each native target
+ for (unsigned int i = 0; i < _targets.size(); i++) {
+ Object *source = new Object(this, "PBXSourcesBuildPhase_" + _targets[i], "PBXSourcesBuildPhase", "PBXSourcesBuildPhase", "", "Sources");
+
+ source->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
+
+ Property files;
+ files.hasOrder = true;
+ files.flags = SettingsAsList;
+
+ int order = 0;
+ for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
+ if (!producesObjectFile((*file)->name)) {
+ continue;
+ }
+ std::string comment = (*file)->name + " in Sources";
+ ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++);
+ }
+
+ source->properties["files"] = files;
+
+ source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
+
+ _sourcesBuildPhase.add(source);
+ }
}
// Setup all build configurations