Skip to content

Commit

Permalink
Add linker-option for -framework Security to all apple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
05nelsonm committed Oct 2, 2023
1 parent 88acc77 commit bd5d3c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions library/driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import co.touchlab.cklib.gradle.CompileToBitcode.Language.C
import co.touchlab.cklib.gradle.CompileToBitcodeExtension
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.konan.target.Architecture.*
import org.jetbrains.kotlin.konan.target.Family.*
Expand Down Expand Up @@ -114,6 +115,14 @@ kmpConfiguration {
config.kotlinVersion = libs.versions.gradle.kotlin.get()
createSqlite3mc()
}

targets.filterIsInstance<KotlinNativeTarget>().forEach { target ->
if (!target.konanTarget.family.isAppleFamily) return@forEach

target.compilations["main"].kotlinOptions {
freeCompilerArgs += listOf("-linker-options", "-framework Security")
}
}
}
}
}
Expand Down

0 comments on commit bd5d3c5

Please sign in to comment.