Files
cpp-examples/sdl/03-sdl2-linux-package/build.gradle
2014-04-21 20:59:48 +02:00

36 lines
763 B
Groovy

apply plugin: 'c'
apply plugin: 'visual-studio'
sources {
main {
c {
source {
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/"
from "src/main/resources"
into "build/binaries/mainExecutable"
}