Files
cpp-examples/sdl/01-sdl2-init/build.gradle
2014-04-19 20:57:36 +02:00

31 lines
683 B
Groovy

apply plugin: 'c'
apply plugin: 'visual-studio'
sources {
main {
c {
source {
// Include just source, avoid including *.swp and other helper files
include "**/*.c"
}
exportedHeaders {
srcDir "../build/include"
}
}
}
}
executables {
main {
binaries.all {
if (toolChain in VisualCpp) {
cCompiler.args "/MD"
linker.args "/SUBSYSTEM:CONSOLE", "/LIBPATH:../build/lib/", "SDL2main.lib", "SDL2.lib"
} else if (toolChain in Gcc) {
linker.args "-lSDL2"
}
}
}
}