This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 569
/
build.gradle
56 lines (52 loc) · 2.16 KB
/
build.gradle
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
plugins {
id 'kotlin-multiplatform'
}
// Determine host preset.
def hostPreset = MPPTools.defaultHostPreset(project, [kotlin.presets.macosX64, kotlin.presets.linuxX64, kotlin.presets.mingwX64])
kotlin {
targets {
fromPreset(hostPreset, 'videoPlayer') {
compilations.main.outputKinds 'EXECUTABLE'
compilations.main.entryPoint 'sample.videoplayer.main'
switch (hostPreset) {
case presets.macosX64:
compilations.main.linkerOpts '-L/opt/local/lib', '-L/usr/local/lib'
break
case presets.linuxX64:
compilations.main.linkerOpts '-L/usr/lib/x86_64-linux-gnu', '-L/usr/lib64'
break
case presets.mingwX64:
compilations.main.linkerOpts "-L${MPPTools.mingwPath()}/lib"
break
}
compilations.main.cinterops {
ffmpeg {
switch (hostPreset) {
case presets.macosX64:
includeDirs.headerFilterOnly '/opt/local/include', '/usr/local/include'
break
case presets.linuxX64:
includeDirs.headerFilterOnly '/usr/include', '/usr/include/x86_64-linux-gnu', '/usr/include/ffmpeg'
break
case presets.mingwX64:
includeDirs "${MPPTools.mingwPath()}/include"
break
}
}
sdl {
switch (hostPreset) {
case presets.macosX64:
includeDirs '/opt/local/include/SDL2', '/usr/local/include/SDL2'
break
case presets.linuxX64:
includeDirs '/usr/include/SDL2'
break
case presets.mingwX64:
includeDirs "${MPPTools.mingwPath()}/include/SDL2"
break
}
}
}
}
}
}