diff options
author | Filippos Karapetis | 2015-03-06 02:39:57 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-03-06 02:39:57 +0200 |
commit | 9a494936561a5351f5bfb9e840d70c05684239c3 (patch) | |
tree | a79fc0a530db37b6e9f92f3dc320885beaa80b4d | |
parent | 76e824eddca2afbdccd109c3c3311e8af0f2bd83 (diff) | |
download | scummvm-rg350-9a494936561a5351f5bfb9e840d70c05684239c3.tar.gz scummvm-rg350-9a494936561a5351f5bfb9e840d70c05684239c3.tar.bz2 scummvm-rg350-9a494936561a5351f5bfb9e840d70c05684239c3.zip |
DEVTOOLS: Add support for linking with SDL 2.0 in create_project
This is handled with the new command-line option, --sdl2
-rw-r--r-- | devtools/create_project/create_project.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index e71816f575..34d30e1d69 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -125,6 +125,7 @@ int main(int argc, char *argv[]) { ProjectType projectType = kProjectNone; int msvcVersion = 9; + bool useSDL2 = false; // Parse command line arguments using std::cout; @@ -267,6 +268,8 @@ int main(int argc, char *argv[]) { setup.devTools = true; } else if (!std::strcmp(argv[i], "--tests")) { setup.tests = true; + } else if (!std::strcmp(argv[i], "--sdl2")) { + useSDL2 = true; } else { std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n"; return -1; @@ -335,7 +338,13 @@ int main(int argc, char *argv[]) { // Windows only has support for the SDL backend, so we hardcode it here (along with winmm) setup.defines.push_back("WIN32"); setup.defines.push_back("SDL_BACKEND"); - setup.libraries.push_back("sdl"); + if (!useSDL2) { + cout << "\nLinking to SDL 1.2\n\n"; + setup.libraries.push_back("sdl"); + } else { + cout << "\nLinking to SDL 2.0\n\n"; + setup.libraries.push_back("sdl2"); + } setup.libraries.push_back("winmm"); // Add additional project-specific library @@ -645,6 +654,9 @@ void displayHelp(const char *exe) { "Optional features settings:\n" " --enable-<name> enable inclusion of the feature \"name\"\n" " --disable-<name> disable inclusion of the feature \"name\"\n" + "\n" + "SDL settings:\n" + " --sdl2 link to SDL 2.0, instead of SDL 1.2\n" "\n" " There are the following features available:\n" "\n"; |