26 lines
924 B
Groovy
26 lines
924 B
Groovy
plugins {
|
|
id 'kotlin-multiplatform'
|
|
}
|
|
|
|
// Determine host preset.
|
|
def hostPreset = MPPTools.defaultHostPreset(project, [kotlin.presets.macosX64, kotlin.presets.linuxX64])
|
|
|
|
kotlin {
|
|
targets {
|
|
fromPreset(hostPreset, 'gtk') {
|
|
compilations.main.outputKinds 'EXECUTABLE'
|
|
compilations.main.entryPoint 'sample.gtk.main'
|
|
compilations.main.cinterops {
|
|
gtk3 {
|
|
['/opt/local/include', '/usr/include', '/usr/local/include'].each {
|
|
includeDirs "$it/atk-1.0", "$it/gdk-pixbuf-2.0", "$it/cairo", "$it/pango-1.0", "$it/gtk-3.0", "$it/glib-2.0"
|
|
}
|
|
includeDirs '/opt/local/lib/glib-2.0/include', '/usr/lib/x86_64-linux-gnu/glib-2.0/include', '/usr/local/lib/glib-2.0/include'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
MPPTools.createRunTask(project, 'runProgram', kotlin.targets.gtk)
|