Skip to content

Commit bd5d3c5

Browse files
committed
Add linker-option for -framework Security to all apple targets
1 parent 88acc77 commit bd5d3c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

library/driver/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import co.touchlab.cklib.gradle.CompileToBitcode.Language.C
1717
import co.touchlab.cklib.gradle.CompileToBitcodeExtension
1818
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated
19+
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
1920
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
2021
import org.jetbrains.kotlin.konan.target.Architecture.*
2122
import org.jetbrains.kotlin.konan.target.Family.*
@@ -114,6 +115,14 @@ kmpConfiguration {
114115
config.kotlinVersion = libs.versions.gradle.kotlin.get()
115116
createSqlite3mc()
116117
}
118+
119+
targets.filterIsInstance<KotlinNativeTarget>().forEach { target ->
120+
if (!target.konanTarget.family.isAppleFamily) return@forEach
121+
122+
target.compilations["main"].kotlinOptions {
123+
freeCompilerArgs += listOf("-linker-options", "-framework Security")
124+
}
125+
}
117126
}
118127
}
119128
}

0 commit comments

Comments
 (0)