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")
215215lazy val libiconv = bindingProject(" iconv" )
216216 .configure(binding(" iconv.h" ))
217217 .settings(
218- Test / nativeLinkingOptions ++= {
219- // Link with libiconv on macOS.
218+ // #sbt-iconv-linking-options
219+ Compile / nativeLinkingOptions ++= {
220220 Option (System .getProperty(" os.name" )) match {
221221 case Some (" Mac OS X" ) => Seq (" -liconv" )
222222 case _ => Seq .empty
223223 }
224224 }
225+ // #sbt-iconv-linking-options
226+ ,
227+ Test / nativeLinkingOptions ++= {
228+ (Compile / nativeLinkingOptions).value
229+ }
225230 )
226231
227232// #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:
66
77@@binding [ iconv]
88
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+
914## Example
1015
1116@@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