Skip to content

Commit 5ba2ac2

Browse files
committed
fix: correct rpath syntax in binding.gyp
1 parent 3529861 commit 5ba2ac2

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed

binding.gyp

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{
2-
"targets": [
3-
{
4-
"target_name": "hamlib",
5-
"sources": [
6-
"src/hamlib.cpp",
7-
"src/decoder.cpp",
8-
"src/addon.cpp"
9-
],
10-
"include_dirs": [
11-
"include",
12-
"<!@(node -p \"require('node-addon-api').include\")"
13-
],
14-
"dependencies": [
15-
"<!(node -p \"require('node-addon-api').gyp\")"
16-
],
17-
"defines": [
18-
"NAPI_DISABLE_CPP_EXCEPTIONS"
19-
],
20-
"cflags!": [ "-fno-exceptions" ],
21-
"cflags_cc!": [ "-fno-exceptions" ],
22-
"conditions": [
23-
# Linux configuration
1+
{
2+
"targets": [
3+
{
4+
"target_name": "hamlib",
5+
"sources": [
6+
"src/hamlib.cpp",
7+
"src/decoder.cpp",
8+
"src/addon.cpp"
9+
],
10+
"include_dirs": [
11+
"include",
12+
"<!@(node -p \"require('node-addon-api').include\")"
13+
],
14+
"dependencies": [
15+
"<!(node -p \"require('node-addon-api').gyp\")"
16+
],
17+
"defines": [
18+
"NAPI_DISABLE_CPP_EXCEPTIONS"
19+
],
20+
"cflags!": [ "-fno-exceptions" ],
21+
"cflags_cc!": [ "-fno-exceptions" ],
22+
"conditions": [
23+
# Linux configuration
2424
["OS==\"linux\"", {
2525
"include_dirs": [
2626
"/usr/include",
@@ -32,10 +32,10 @@
3232
"-lhamlib"
3333
],
3434
"ldflags": [
35-
"-Wl,-rpath,\\$ORIGIN"
35+
"-Wl,-rpath,$$ORIGIN"
3636
]
3737
}],
38-
# macOS configuration
38+
# macOS configuration
3939
["OS==\"mac\"", {
4040
"include_dirs": [
4141
"/usr/local/include",
@@ -55,38 +55,38 @@
5555
"-Wl,-rpath,@loader_path"
5656
]
5757
}],
58-
# Windows configuration
59-
["OS==\"win\"", {
60-
"defines": [
61-
"WIN32_LEAN_AND_MEAN",
62-
"_WIN32_WINNT=0x0600"
63-
],
64-
"conditions": [
65-
["target_arch==\"x64\"", {
66-
"conditions": [
67-
# Check if we're in MinGW environment (HAMLIB_ROOT is set to /mingw64)
68-
["\"<!(node -e \"console.log(process.env.HAMLIB_ROOT || '')\")\"==\"/mingw64\"", {
69-
"include_dirs": [
70-
"/mingw64/include"
71-
],
72-
"library_dirs": [
73-
"/mingw64/lib"
74-
],
75-
"libraries": [
76-
"-lhamlib",
77-
"-lws2_32",
78-
"-lwinmm"
79-
],
80-
"cflags": [
81-
"-I/mingw64/include"
82-
],
83-
"ldflags": [
84-
"-L/mingw64/lib",
85-
"-static-libgcc",
86-
"-static-libstdc++"
87-
]
88-
}, {
89-
# Traditional Windows build with Visual C++
58+
# Windows configuration
59+
["OS==\"win\"", {
60+
"defines": [
61+
"WIN32_LEAN_AND_MEAN",
62+
"_WIN32_WINNT=0x0600"
63+
],
64+
"conditions": [
65+
["target_arch==\"x64\"", {
66+
"conditions": [
67+
# Check if we're in MinGW environment (HAMLIB_ROOT is set to /mingw64)
68+
["\"<!(node -e \"console.log(process.env.HAMLIB_ROOT || '')\")\"==\"/mingw64\"", {
69+
"include_dirs": [
70+
"/mingw64/include"
71+
],
72+
"library_dirs": [
73+
"/mingw64/lib"
74+
],
75+
"libraries": [
76+
"-lhamlib",
77+
"-lws2_32",
78+
"-lwinmm"
79+
],
80+
"cflags": [
81+
"-I/mingw64/include"
82+
],
83+
"ldflags": [
84+
"-L/mingw64/lib",
85+
"-static-libgcc",
86+
"-static-libstdc++"
87+
]
88+
}, {
89+
# Traditional Windows build with Visual C++
9090
"include_dirs": [
9191
# Try environment variable in different formats
9292
"<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/include')\")",
@@ -147,9 +147,9 @@
147147
}]
148148
]
149149
}]
150-
]
151-
}]
152-
]
153-
}
154-
]
150+
]
151+
}]
152+
]
153+
}
154+
]
155155
}

0 commit comments

Comments
 (0)