Skip to content

Commit

Permalink
fix: change libray name patterns
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Arndt <[email protected]>
  • Loading branch information
SpotlightKid committed Jan 23, 2025
1 parent 12c3df3 commit 4542da3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/jacket.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

# Possible names/install locations of libjack, according to:
# https://github.com/x42/weakjack/blob/master/weak_libjack.c#L108
proc getJackLibName: string =
when system.hostOS == "windows":
when sizeof(int) == 4:
result = "libjack.dll"
else:
result = "libjack64.dll"
elif system.hostOS == "macosx":
result = "(|/usr/local/lib/|/opt/homebrew/lib/|/opt/homebrew/opt/jack/lib/|/opt/local/lib/)libjack.dylib"
when defined(windows):
when sizeof(int) == 4:
const soname = "(|lib)jack.dll"
else:
result = "libjack.so.0"
const soname = "(|lib)jack64.dll"
elif defined(macosx):
const soname = "libjack.dylib"
else:
const soname = "libjack.so.0"

{.push dynlib: getJackLibName().}
{.push dynlib: soname.}

# ------------------------------ Constants --------------------------------

Expand Down

0 comments on commit 4542da3

Please sign in to comment.