update SDL2 example compilation with Gradle

This commit is contained in:
Juraj Michalek
2014-04-19 15:04:59 +02:00
parent cc9f35d783
commit ceadb4719a
4 changed files with 35 additions and 22 deletions

View File

@@ -19,7 +19,8 @@ executables {
main {
binaries.all {
if (toolChain in VisualCpp) {
linker.args "/machine:X86", "/SUBSYSTEM:WINDOWS", "../build/SDL2-2.0.3/lib/x86/SDL2.lib"
cCompiler.args "/MD"
linker.args "/SUBSYSTEM:CONSOLE", "/LIBPATH:../build/SDL2-2.0.3/lib/x86/", "SDL2main.lib", "SDL2.lib"
//linker.args "/SUBSYSTEM:WINDOWS", "/LIBPATH:../build/SDL2-2.0.3/lib/x86/", "SDL2.lib"
}
}

View File

@@ -1,11 +1,10 @@
// sdl2-sample.cpp : SDL2 example - initialize and quit
//
// SDL2 example - initialize and quit
#include "SDL.h"
int main(int argc, char* argv[]) {
SDL_Init(SDL_INIT_EVERYTHING);
int main(int argc, char** argv){
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}

View File

@@ -1,7 +0,0 @@
Dependencies
------------
Download and unzip dependency http://libsdl.org/release/SDL2-devel-2.0.1-VC.zip
to this directory. You should see directory SDL2-2.0.1 with SDL2 files.
Alternatively you can download library by DownloadLibrary.ps1 script.