mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-11 22:40:49 +01:00
add SDL2 linux package project
This commit is contained in:
35
sdl/03-sdl2-linux-package/build.gradle
Normal file
35
sdl/03-sdl2-linux-package/build.gradle
Normal file
@@ -0,0 +1,35 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user