aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/create_project.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/create_project/create_project.cpp')
-rw-r--r--devtools/create_project/create_project.cpp47
1 files changed, 41 insertions, 6 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index b75b22a290..29bc5bfcd5 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -28,11 +28,12 @@
#include "config.h"
#include "create_project.h"
-#include "codeblocks.h"
+#include "codeblocks.h"
#include "msvc.h"
#include "visualstudio.h"
#include "msbuild.h"
+#include "xcode.h"
#include <fstream>
#include <iostream>
@@ -107,13 +108,14 @@ typedef std::list<FSNode> FileList;
enum ProjectType {
kProjectNone,
kProjectCodeBlocks,
- kProjectMSVC
+ kProjectMSVC,
+ kProjectXcode
};
int main(int argc, char *argv[]) {
#ifndef USE_WIN32_API
// Initialize random number generator for UUID creation
- std::srand(std::time(0));
+ std::srand((uint)std::time(0));
#endif
if (argc < 2) {
@@ -175,6 +177,14 @@ int main(int argc, char *argv[]) {
projectType = kProjectMSVC;
+ } else if (!std::strcmp(argv[i], "--xcode")) {
+ if (projectType != kProjectNone) {
+ std::cerr << "ERROR: You cannot pass more than one project type!\n";
+ return -1;
+ }
+
+ projectType = kProjectXcode;
+
} else if (!std::strcmp(argv[i], "--msvc-version")) {
if (i + 1 >= argc) {
std::cerr << "ERROR: Missing \"version\" parameter for \"--msvc-version\"!\n";
@@ -463,6 +473,32 @@ int main(int argc, char *argv[]) {
provider = new CreateProjectTool::MSBuildProvider(globalWarnings, projectWarnings, msvcVersion);
break;
+
+ case kProjectXcode:
+ ////////////////////////////////////////////////////////////////////////////
+ // Xcode is also using GCC behind the scenes. See Code::Blocks comment
+ // for info on all warnings
+ ////////////////////////////////////////////////////////////////////////////
+ globalWarnings.push_back("-Wall");
+ globalWarnings.push_back("-Wno-long-long");
+ globalWarnings.push_back("-Wno-multichar");
+ globalWarnings.push_back("-Wno-unknown-pragmas");
+ globalWarnings.push_back("-Wno-reorder");
+ globalWarnings.push_back("-Wpointer-arith");
+ globalWarnings.push_back("-Wcast-qual");
+ globalWarnings.push_back("-Wcast-align");
+ globalWarnings.push_back("-Wshadow");
+ globalWarnings.push_back("-Wimplicit");
+ globalWarnings.push_back("-Wnon-virtual-dtor");
+ globalWarnings.push_back("-Wwrite-strings");
+ // The following are not warnings at all... We should consider adding them to
+ // a different list of parameters.
+ globalWarnings.push_back("-fno-rtti");
+ globalWarnings.push_back("-fno-exceptions");
+ globalWarnings.push_back("-fcheck-new");
+
+ provider = new CreateProjectTool::XCodeProvider(globalWarnings, projectWarnings);
+ break;
}
provider->createProject(setup);
@@ -501,6 +537,7 @@ void displayHelp(const char *exe) {
"Project specific settings:\n"
" --codeblock build Code::Blocks project files\n"
" --msvc build Visual Studio project files\n"
+ " --xcode build XCode project files\n"
" --file-prefix prefix allow overwriting of relative file prefix in the\n"
" MSVC project files. By default the prefix is the\n"
" \"path\\to\\source\" argument\n"
@@ -636,7 +673,7 @@ bool setEngineBuildState(const std::string &name, EngineDescList &engines, bool
if (engine != engines.end()) {
engine->enable = enable;
- // When we disable an einge, we also need to disable all the sub engines.
+ // When we disable an engine, we also need to disable all the sub engines.
if (!enable && !engine->subEngines.empty()) {
for (StringList::const_iterator j = engine->subEngines.begin(); j != engine->subEngines.end(); ++j) {
EngineDescList::iterator subEngine = std::find(engines.begin(), engines.end(), *j);
@@ -729,7 +766,6 @@ const Feature s_features[] = {
{ "flac", "USE_FLAC", "libFLAC_static", true, "FLAC support" },
{ "png", "USE_PNG", "libpng", true, "libpng support" },
{ "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
- { "mpeg2", "USE_MPEG2", "libmpeg2", false, "mpeg2 codec for cutscenes" },
// Feature flags
{ "scalers", "USE_SCALERS", "", true, "Scalers" },
@@ -738,7 +774,6 @@ const Feature s_features[] = {
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
{ "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" },
- { "indeo3", "USE_INDEO3", "", true, "Indeo3 codec support"},
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there