Is there a way to set `linkerOpts` either in gradl...
# kotlin-native
b
Is there a way to set
linkerOpts
either in gradle config or
*.def
file to be output of
Copy code
pkg-config --libs <LIB>
?
d
It depends on how long you want the
linkerOpts
to persist for. If you set it in the def file and every consumer of the cinterop klib will also use the
linkerOpts
. If you set it in gradle, it will only apply to the binary you build. If you want to use
pkg-config --libs <LIB>
the only to do it is via gradle, using
exec { ... }
to run it and set
linkerOpts
. Similar to what I've done here https://github.com/Dominaezzz/kgl/blob/03c0c6639c98acec4f655b7212b8f2fddc373072/build.gradle.kts#L13 to set the
version
based on git.