aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorColin Snover2017-09-10 20:26:46 -0500
committerColin Snover2017-09-10 22:17:14 -0500
commit3c5440add702f404ac9b0eac25c2655b7b23b884 (patch)
tree282d7e50f8914dd4fa2dcd04e38b26be3d725e98 /devtools
parent9db0c9c60707eb3e999dfb1408950a0b17c85105 (diff)
downloadscummvm-rg350-3c5440add702f404ac9b0eac25c2655b7b23b884.tar.gz
scummvm-rg350-3c5440add702f404ac9b0eac25c2655b7b23b884.tar.bz2
scummvm-rg350-3c5440add702f404ac9b0eac25c2655b7b23b884.zip
CREATE_PROJECT: Move browser_osx.mm hack to Xcode generator
c19c10d548b2867bc4fd003fb29ac0017b2bd29d fixed the bad parsing of module.mk which meant the Xcode generator broke. For the moment, just move the hack for browser_osx.mm into the generator, until there is a more elegant solution to this problem (if ever).
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/xcode.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 7e4a70c157..78c3cf3dff 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -389,6 +389,14 @@ void XcodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
// for folders, we shouldn't add folders as file references, obviously.
if (node->children.empty()) {
group->addChildFile(node->name);
+
+ // HACK: Also add browser_osx.mm, since browser.cpp is added for
+ // iOS and browser_osx.mm for macOS, and create_project cannot
+ // deal with two competing exclusive ifdefs in module.mk going
+ // into one project
+ if (filePrefix.find("/gui/") == filePrefix.size() - 5 && node->name == "browser.cpp") {
+ group->addChildFile("browser_osx.mm");
+ }
}
// Process child nodes
if (!node->children.empty())
@@ -1066,6 +1074,11 @@ void XcodeProvider::setupAdditionalSources(std::string targetName, Property &fil
if (targetIsIOS(targetName)) {
const std::string absoluteCatalogPath = _projectRoot + "/dists/ios7/Images.xcassets";
ADD_SETTING_ORDER_NOVALUE(files, getHash(absoluteCatalogPath), "Image Asset Catalog", order++);
+ } else {
+ // HACK: browser_osx.mm needs to be added
+ const std::string browserPath = "gui/browser_osx.mm";
+ const std::string comment = "browser_osx.mm in Sources";
+ ADD_SETTING_ORDER_NOVALUE(files, getHash(browserPath), comment, order++);
}
}