Is it possible to change libraryPaths in cinterop ...
# multiplatform
k
Is it possible to change libraryPaths in cinterop for different targets? So if it’s Linux use this path, if it’s Windows use this path where the respective targets static libs are located in? (Within the project/cinterop folder)
o
You can always configure
CInteropProcess
task like this (not, path is based on
konanTarget
): https://github.com/whyoleg/cryptography-kotlin/blob/45cf4be3e1b256f20710ae971a5a63[…]b8baf/cryptography-providers/openssl3/prebuilt/build.gradle.kts Or if it’s some not-generated path, you can also redefine this via
extraOpts
when creating
cinterop
object: https://github.com/JetBrains/kotlin/blob/5d88a1f1c382f96fb88fa1d1a8741c6019795e1d/[…]n/kotlin/org/jetbrains/kotlin/gradle/plugin/CinteropSettings.kt
k
I actually found a way to do this which is add libraryPaths.linux/libraryPaths.osx and add paths to static libs within the cinterop folder. I really wish this was documented…
👍 1