aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2015-04-05 01:13:14 +0200
committerEinar Johan Trøan Sømåen2015-04-09 20:02:17 +0200
commit675bbde43602581b6954505ea15df8ebe6074498 (patch)
tree67a80d8939c05438d666bd96a0762f32991997d8 /devtools
parent484ad4dde7a92c1c2cc4859601da94c66a940a5e (diff)
downloadscummvm-rg350-675bbde43602581b6954505ea15df8ebe6074498.tar.gz
scummvm-rg350-675bbde43602581b6954505ea15df8ebe6074498.tar.bz2
scummvm-rg350-675bbde43602581b6954505ea15df8ebe6074498.zip
CREATE_PROJECT: Use a different producesObjectFile-function for Xcode, so that we can allow Objective-C(++) and disallow .asm
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/xcode.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 8989974975..01a03d1357 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -560,6 +560,18 @@ void XCodeProvider::setupResourcesBuildPhase() {
}
}
+bool producesObjectFileOnOSX(const std::string &fileName) {
+ std::string n, ext;
+ splitFilename(fileName, n, ext);
+
+ // Note that the difference between this and the general producesObjectFile is that
+ // this one adds Objective-C(++), and removes asm-support.
+ if (ext == "cpp" || ext == "c" || ext == "m" || ext == "mm")
+ return true;
+ else
+ return false;
+}
+
void XCodeProvider::setupSourcesBuildPhase() {
_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
@@ -578,7 +590,7 @@ void XCodeProvider::setupSourcesBuildPhase() {
int order = 0;
for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
- if (!producesObjectFile((*file)->name)) {
+ if (!producesObjectFileOnOSX((*file)->name)) {
continue;
}
std::string comment = (*file)->name + " in Sources";