2020-10-04 08:45:35 +03:00
|
|
|
@file:Suppress("UNUSED_VARIABLE")
|
|
|
|
|
|
|
|
plugins {
|
2020-10-04 10:10:53 +03:00
|
|
|
id("ru.mipt.npm.mpp")
|
2020-10-04 08:45:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
2020-10-04 10:39:24 +03:00
|
|
|
val hostOs = System.getProperty("os.name")
|
|
|
|
|
|
|
|
val nativeTarget = when {
|
|
|
|
hostOs == "Mac OS X" -> macosX64("native")
|
|
|
|
hostOs == "Linux" -> linuxX64("native")
|
|
|
|
hostOs.startsWith("Windows") -> mingwX64("native")
|
2020-10-04 10:10:53 +03:00
|
|
|
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
|
|
|
}
|
|
|
|
|
|
|
|
val main by nativeTarget.compilations.getting {
|
|
|
|
cinterops {
|
2020-10-04 09:19:49 +03:00
|
|
|
val libgsl by creating {
|
|
|
|
defFile("src/nativeInterop/cinterop/libgsl.def")
|
|
|
|
includeDirs { allHeaders("./src/nativeMain/resources/") }
|
2020-10-04 08:45:35 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.commonMain {
|
|
|
|
dependencies {
|
|
|
|
api(project(":kmath-core"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|