Files
cpp-examples/sdl/01-sdl2-init/build.gradle
2014-04-28 08:10:46 +02:00

38 lines
840 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"
}
}
}
}
task prepare(type: Copy) {
description "Copy DLL dependencies"
from "../build/lib/"
into "build/binaries/mainExecutable"
}