From 57ca6e57afbbfa2da4afc2edaef5f13f75ddc62b Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 9 Sep 2020 12:33:29 +0300 Subject: [PATCH] Add linux native target on windows --- src/main/kotlin/ru/mipt/npm/gradle/KScienceNativePlugin.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceNativePlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceNativePlugin.kt index 664ce68..c0d659c 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceNativePlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceNativePlugin.kt @@ -21,13 +21,18 @@ class KScienceNativePlugin : Plugin { val nativeTarget = when { hostOs == "Mac OS X" -> macosX64("native") hostOs == "Linux" -> linuxX64("native") - isMingwX64 -> mingwX64("native") + isMingwX64 -> { + mingwX64("native") + linuxX64() + } else -> throw GradleException("Host OS is not supported in Kotlin/Native.") } sourceSets.invoke { val nativeMain by getting + findByName("linuxX64Main")?.dependsOn(nativeMain) val nativeTest by getting + findByName("linuxX64Test")?.dependsOn(nativeTest) } } }