Verified Commit 4368313b authored by madhead's avatar madhead

So, hello, wonderful world of native development

parent 6675db34
Pipeline #66638723 failed with stages
in 3 minutes and 13 seconds
......@@ -7,10 +7,42 @@ repositories {
}
kotlin {
linuxArm32Hfp("raspberrypi") {
// linuxArm32Hfp("raspberrypi") {
// compilations {
// val main by getting {
// val dbus by cinterops.creating {
// defFile(file("src/raspberrypiMain/cinterop/dbus/dbus.def"))
// packageName("org.freedesktop.dbus")
// includeDirs("src/raspberrypiMain/cinterop/dbus/headers")
// }
// }
// }
// binaries {
// executable("saberlight") {
// entryPoint = "by.dev.madhead.saberlight.main"
// }
// }
// }
linuxX64("linux") {
compilations {
val main by getting {
val dbus by cinterops.creating {
defFile(file("src/linuxMain/cinterop/dbus/dbus.def"))
packageName("org.freedesktop.dbus")
includeDirs(
"/usr/include/dbus-1.0/",
"/usr/lib/dbus-1.0/include/"
)
}
}
}
binaries {
executable("saberlight") {
entryPoint = "by.dev.madhead.saberlight.main"
linkerOpts = mutableListOf(
"-L/usr/lib",
"-ldbus-1"
)
}
}
}
......
package by.dev.madhead.saberlight
import org.freedesktop.dbus.DBusBusType
import org.freedesktop.dbus.dbus_bus_get
fun main() {
val bus = dbus_bus_get(DBusBusType.DBUS_BUS_SYSTEM, null)
println(bus)
println("Hello, world!")
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment