mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-11 22:40:49 +01:00
27 lines
600 B
Groovy
27 lines
600 B
Groovy
apply plugin: 'c'
|
|
apply plugin: 'visual-studio'
|
|
|
|
model {
|
|
components {
|
|
main(NativeExecutableSpec) {}
|
|
}
|
|
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"
|
|
}
|
|
|