mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-05-16 23:29:59 +00:00
parent
c2c03f1f0f
commit
bb8a3e7e22
@ -30,7 +30,14 @@ macro declareLibrary*(libraryName: static[string]): untyped =
|
|||||||
nnkExprColonExpr.newTree(ident"passl", newStrLitNode(soName))
|
nnkExprColonExpr.newTree(ident"passl", newStrLitNode(soName))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
elif defined(macosx):
|
||||||
|
## Generates {.passl: "-install_name @rpath/libwaku.dylib".}
|
||||||
|
let installName = fmt"-install_name @rpath/lib{libraryName}.dylib"
|
||||||
|
res.add(
|
||||||
|
newNimNode(nnkPragma).add(
|
||||||
|
nnkExprColonExpr.newTree(ident"passl", newStrLitNode(installName))
|
||||||
|
)
|
||||||
|
)
|
||||||
## proc lib{libraryName}NimMain() {.importc.}
|
## proc lib{libraryName}NimMain() {.importc.}
|
||||||
let libNimMainName = ident(fmt"lib{libraryName}NimMain")
|
let libNimMainName = ident(fmt"lib{libraryName}NimMain")
|
||||||
let importcPragma = nnkPragma.newTree(ident"importc")
|
let importcPragma = nnkPragma.newTree(ident"importc")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user