Skip to content

Commit 4542da3

Browse files
committed
fix: change libray name patterns
Signed-off-by: Christopher Arndt <[email protected]>
1 parent 12c3df3 commit 4542da3

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/jacket.nim

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@
22

33
# Possible names/install locations of libjack, according to:
44
# https://github.com/x42/weakjack/blob/master/weak_libjack.c#L108
5-
proc getJackLibName: string =
6-
when system.hostOS == "windows":
7-
when sizeof(int) == 4:
8-
result = "libjack.dll"
9-
else:
10-
result = "libjack64.dll"
11-
elif system.hostOS == "macosx":
12-
result = "(|/usr/local/lib/|/opt/homebrew/lib/|/opt/homebrew/opt/jack/lib/|/opt/local/lib/)libjack.dylib"
5+
when defined(windows):
6+
when sizeof(int) == 4:
7+
const soname = "(|lib)jack.dll"
138
else:
14-
result = "libjack.so.0"
9+
const soname = "(|lib)jack64.dll"
10+
elif defined(macosx):
11+
const soname = "libjack.dylib"
12+
else:
13+
const soname = "libjack.so.0"
1514

16-
{.push dynlib: getJackLibName().}
15+
{.push dynlib: soname.}
1716

1817
# ------------------------------ Constants --------------------------------
1918

0 commit comments

Comments
 (0)