-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
64 lines (59 loc) · 1.75 KB
/
build.gradle
File metadata and controls
64 lines (59 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apply plugin: "cpp"
apply plugin: "c"
model {
toolChains {
gcc(Gcc) {
// force windows_x86 to compile for 64 bit instead of 32
// gradle doesn't seem to recognize 64 bit windows
target("windows_x86")
{
cCompiler.executable "x86_64-w64-mingw32-gcc"
cppCompiler.executable "x86_64-w64-mingw32-g++"
linker.executable "x86_64-w64-mingw32-g++"
assembler.executable "x86_64-w64-mingw32-gcc-as"
staticLibArchiver.executable "x86_64-w64-mingw32-gcc-ar"
linker.withArguments {
args -> args << "-m64"
}
}
/*
// actual windows_x86 target configuration
target("windows_x86")
{
cCompiler.executable "i686-w64-mingw32-gcc"
cppCompiler.executable "i686-w64-mingw32-g++"
linker.executable "i686-w64-mingw32-g++"
assembler.executable "i686-w64-mingw32-gcc-as"
staticLibArchiver.executable "i686-w64-mingw32-gcc-ar"
}
*/
}
}
repositories {
libs(PrebuiltLibraries) {
SDL2 {
headers.srcDir "third party/SDL2/include"
binaries.withType(SharedLibraryBinary) {
def os = getTargetPlatform().getOperatingSystem()
if(!os.isCurrent())
return;
if(os.isWindows())
sharedLibraryFile = file("third party/SDL2/lib/SDL2.dll")
else if(os.isLinux())
sharedLibraryFile = file("/usr/lib/libSDL2.so")
}
}
}
}
components {
ProvaEngine(NativeLibrarySpec) {
sources {
cpp {
lib library: 'SDL2'
exportedHeaders.srcDirs "include", "third party/glad/include", "third party/stb/include"
source.srcDirs "src", "third party/glad/src"
}
}
}
}
}