mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-17 09:06:49 +01:00
30 lines
598 B
Groovy
30 lines
598 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|