File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
docs/src/paradox/bindings Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,18 @@ lazy val bindings = project("bindings")
215
215
lazy val libiconv = bindingProject(" iconv" )
216
216
.configure(binding(" iconv.h" ))
217
217
.settings(
218
- Test / nativeLinkingOptions ++= {
219
- // Link with libiconv on macOS.
218
+ // #sbt-iconv-linking-options
219
+ Compile / nativeLinkingOptions ++= {
220
220
Option (System .getProperty(" os.name" )) match {
221
221
case Some (" Mac OS X" ) => Seq (" -liconv" )
222
222
case _ => Seq .empty
223
223
}
224
224
}
225
+ // #sbt-iconv-linking-options
226
+ ,
227
+ Test / nativeLinkingOptions ++= {
228
+ (Compile / nativeLinkingOptions).value
229
+ }
225
230
)
226
231
227
232
// #sbt-binding-project-multi-header
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ To use this binding add the following resolver and the dependency:
6
6
7
7
@@binding [ iconv]
8
8
9
+ You also need to configure your build tool to link with the iconv library on macOS.
10
+ For sbt, you can use the following code:
11
+
12
+ @@snip [ sbt-iconv] ( ../../../../build.sbt ) { #sbt-iconv-linking-options }
13
+
9
14
## Example
10
15
11
16
@@snip [ iconv] ( ../../../../bindings/iconv/src/test/scala/org/scalanative/bindgen/bindings/tests/IconvSpec.scala ) { #usage-example }
You can’t perform that action at this time.
0 commit comments