diff options
author | Thierry Crozat | 2019-08-19 23:02:59 +0100 |
---|---|---|
committer | Thierry Crozat | 2019-08-19 23:02:59 +0100 |
commit | 406cc804580bf3503b3568c015974b1dc7cad432 (patch) | |
tree | 22a95874115a50dda24cdb6e8bf8611656c45197 /devtools/create_project | |
parent | f52a96e1f4d2ac3abbdb4d47b7cecfab761db1db (diff) | |
download | scummvm-rg350-406cc804580bf3503b3568c015974b1dc7cad432.tar.gz scummvm-rg350-406cc804580bf3503b3568c015974b1dc7cad432.tar.bz2 scummvm-rg350-406cc804580bf3503b3568c015974b1dc7cad432.zip |
CREATE_PROJECT: Handle compilation with libcurl and SDL_net in Xcode projects
Diffstat (limited to 'devtools/create_project')
-rw-r--r-- | devtools/create_project/xcode.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 6236629b69..d91dfc7f28 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -439,12 +439,12 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { DEF_SYSFRAMEWORK("CoreMIDI"); DEF_SYSFRAMEWORK("CoreGraphics"); DEF_SYSFRAMEWORK("CoreFoundation"); - DEF_SYSFRAMEWORK("CoreMIDI"); DEF_SYSFRAMEWORK("Foundation"); DEF_SYSFRAMEWORK("IOKit"); DEF_SYSFRAMEWORK("OpenGLES"); DEF_SYSFRAMEWORK("QuartzCore"); DEF_SYSFRAMEWORK("UIKit"); + DEF_SYSFRAMEWORK("Security"); DEF_SYSFRAMEWORK("SystemConfiguration"); DEF_SYSTBD("libiconv"); @@ -493,9 +493,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { if (setup.useSDL2) { DEF_LOCALLIB_STATIC("libSDL2main"); DEF_LOCALLIB_STATIC("libSDL2"); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) + DEF_LOCALLIB_STATIC("libSDL2_net"); } else { DEF_LOCALLIB_STATIC("libSDLmain"); DEF_LOCALLIB_STATIC("libSDL"); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) + DEF_LOCALLIB_STATIC("libSDL_net"); } frameworksGroup->_properties["children"] = children; @@ -568,6 +572,16 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { if (CONTAINS_DEFINE(setup.defines, "USE_ZLIB")) { frameworks_iOS.push_back("libz.tbd"); } + if (CONTAINS_DEFINE(setup.defines, "USE_LIBCURL")) { + frameworks_iOS.push_back("libcurl.a"); + frameworks_iOS.push_back("Security.framework"); + } + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) { + if (setup.useSDL2) + frameworks_iOS.push_back("libSDL2_net.a"); + else + frameworks_iOS.push_back("libSDL_net.a"); + } for (ValueList::iterator framework = frameworks_iOS.begin(); framework != frameworks_iOS.end(); framework++) { std::string id = "Frameworks_" + *framework + "_iphone"; @@ -650,9 +664,13 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { if (setup.useSDL2) { frameworks_osx.push_back("libSDL2main.a"); frameworks_osx.push_back("libSDL2.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) + frameworks_iOS.push_back("libSDL2_net.a"); } else { frameworks_osx.push_back("libSDLmain.a"); frameworks_osx.push_back("libSDL.a"); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) + frameworks_iOS.push_back("libSDL_net.a"); } order = 0; @@ -772,6 +790,7 @@ XcodeProvider::ValueList& XcodeProvider::getResourceFiles() const { files.push_back("dists/engine-data/macventure.dat"); files.push_back("dists/engine-data/xeen.ccs"); files.push_back("dists/pred.dic"); + files.push_back("dists/networking/wwwroot.zip"); files.push_back("icons/scummvm.icns"); files.push_back("AUTHORS"); files.push_back("COPYING"); @@ -974,6 +993,12 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { iPhone_HeaderSearchPaths.push_back("$(SRCROOT)"); iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "\""); iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "/include\""); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) { + if (setup.useSDL2) + iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "/include/SDL2\""); + else + iPhone_HeaderSearchPaths.push_back("\"" + projectOutputDirectory + "include/SDL\""); + } ADD_SETTING_LIST(iPhone_Debug, "HEADER_SEARCH_PATHS", iPhone_HeaderSearchPaths, kSettingsAsList | kSettingsQuoteVariable, 5); ADD_SETTING_QUOTE(iPhone_Debug, "INFOPLIST_FILE", "$(SRCROOT)/dists/ios7/Info.plist"); ValueList iPhone_LibPaths; @@ -992,6 +1017,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { ADD_DEFINE(scummvmIOS_defines, "IPHONE"); ADD_DEFINE(scummvmIOS_defines, "IPHONE_IOS7"); ADD_DEFINE(scummvmIOS_defines, "IPHONE_SANDBOXED"); + if (CONTAINS_DEFINE(setup.defines, "USE_SDL_NET")) + ADD_DEFINE(scummvmIOS_defines, "WITHOUT_SDL"); ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, kSettingsNoQuote | kSettingsAsList, 5); ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_APPICON_NAME", "AppIcon"); ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME", "LaunchImage"); |