diff options
author | Vincent Bénony | 2015-12-11 10:27:30 +0100 |
---|---|---|
committer | Vincent Bénony | 2016-01-06 16:17:38 +0100 |
commit | 7ca7608711eebf3542b1e1fa4e3aaf59023123a1 (patch) | |
tree | e0f7d7e32ad86c7225951f8ae64f5f85a49902b5 | |
parent | dcfe197317ccd026e5ae25f048826800aa3288b4 (diff) | |
download | scummvm-rg350-7ca7608711eebf3542b1e1fa4e3aaf59023123a1.tar.gz scummvm-rg350-7ca7608711eebf3542b1e1fa4e3aaf59023123a1.tar.bz2 scummvm-rg350-7ca7608711eebf3542b1e1fa4e3aaf59023123a1.zip |
IOS: Support for libmad
-rw-r--r-- | devtools/create_project/xcode.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 1239974d11..a0521d041e 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -45,6 +45,9 @@ namespace CreateProjectTool { #define REMOVE_DEFINE(defines, name) \ { ValueList::iterator i = std::find(defines.begin(), defines.end(), name); if (i != defines.end()) defines.erase(i); } +#define CONTAINS_DEFINE(defines, name) \ + (std::find(defines.begin(), defines.end(), name) != defines.end()) + #define ADD_SETTING(config, key, value) \ config.settings[key] = Setting(value, "", SettingsNoQuote); @@ -463,6 +466,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libogg.a", "libogg", true); DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libpng.a", "libpng", true); DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libvorbis.a", "libvorbis", true); + DEF_LOCALLIB_STATIC_PATH(absoluteOutputDir + "/libmad.a", "libmad", true); frameworksGroup->properties["children"] = children; _groups.add(frameworksGroup); @@ -495,11 +499,11 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { frameworks_iOS.push_back("QuartzCore.framework"); frameworks_iOS.push_back("OpenGLES.framework"); - frameworks_iOS.push_back("libFLACiOS.a"); - frameworks_iOS.push_back("libFreetype2.a"); - frameworks_iOS.push_back("libogg.a"); - frameworks_iOS.push_back("libpng.a"); - frameworks_iOS.push_back("libvorbis.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_FLAC")) frameworks_iOS.push_back("libFLACiOS.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_FREETYPE2")) frameworks_iOS.push_back("libFreetype2.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_PNG")) frameworks_iOS.push_back("libpng.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_VORBIS")) { frameworks_iOS.push_back("libogg.a"); frameworks_iOS.push_back("libvorbis.a"); } + if (CONTAINS_DEFINE(setup.defines, "USE_MAD")) frameworks_iOS.push_back("libmad.a"); for (ValueList::iterator framework = frameworks_iOS.begin(); framework != frameworks_iOS.end(); framework++) { std::string id = "Frameworks_" + *framework + "_iphone"; |