-
Notifications
You must be signed in to change notification settings - Fork 49
/
binding.gyp
69 lines (69 loc) · 2.03 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"targets": [
{
"target_name": "grandiose",
"sources": [
"src/grandiose_util.cc",
"src/grandiose_find.cc",
"src/grandiose_send.cc",
"src/grandiose_receive.cc",
"src/grandiose.cc"
],
"include_dirs": [ "include", "<!(node -p \"require('node-addon-api').include_dir\")" ],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS",
"NODE_ADDON_API_ENABLE_MAYBE"
],
"conditions":[
["OS=='win'", {
# windows can't do rpath, so needs to be copied next to the .node file
"copies":[
{
"destination": "build/Release",
"files": [
"lib/win_x64/Processing.NDI.Lib.x64.dll"
]
}
],
"link_settings": {
"libraries": [ "Processing.NDI.Lib.x64.lib" ],
"library_dirs": [ "lib/win_x64" ]
},
}],
["OS=='linux'", {
"cflags": [
"-Wno-write-strings" # temporary, until all the C style code is replaced
],
"link_settings": {
"libraries": [
"<(module_root_dir)/lib/linux_x64/libndi.so.5"
],
"ldflags": [
"-L<@(module_root_dir)/lib/linux_x64",
"-Wl,-rpath=\\$$ORIGIN/../../lib/linux_x64",
]
},
}],
["OS=='mac'", {
"cflags+": ["-fvisibility=hidden"],
"xcode_settings": {
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden
"OTHER_CPLUSPLUSFLAGS": [
"-std=c++14",
"-stdlib=libc++",
"-fexceptions"
],
"OTHER_LDFLAGS": [
"-Wl,-rpath,@loader_path/../../lib/mac_universal"
]
},
"link_settings": {
"libraries": [
"<(module_root_dir)/lib/mac_universal/libndi.dylib"
],
}
}]
]
}
]
}