-
Notifications
You must be signed in to change notification settings - Fork 5
/
binding.gyp
80 lines (79 loc) · 2.91 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
70
71
72
73
74
75
76
77
78
79
80
{
"targets": [
{
"target_name": "<(module_name)",
"cflags!": ["-fno-exceptions"],
"cflags+": ["-fexceptions"],
"cflags_cc!": ["-fno-exceptions"],
"cflags_cc+": ["-fexceptions"],
"sources": [
"src/ndi.cpp",
"src/find/find_sources.cpp",
"src/find/source_instance.cpp",
"src/send/send_create.cpp",
"src/send/send_instance.cpp",
"src/structures/audio_frame.cpp",
"src/structures/tally_state.cpp",
"src/structures/video_frame.cpp",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include_dir\")",
"<!@(node -p \"require('./utils/paths').ndi_sdk.include_dir\")",
"include"
],
"conditions": [
["OS==\"mac\"",
{
"link_settings": {
"libraries": [
"-Wl,-rpath,@loader_path",
"-Wl,-rpath,@loader_path/..",
"-lndi"
],
},
"copies": [
{
"destination": "$(BUILDTYPE)/",
"files": [
"<!@(node -p \"require('./utils/paths').ndi_sdk.lib_dir\")/libndi.dylib",
]
}
],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
}
}
],
["OS==\"linux\"",
{
"link_settings": {
"libraries": [
"-Wl,-rpath='$$ORIGIN'",
"-Wl,-rpath='$$ORIGIN'/..",
# TODO: Find a way to appropriately bind the library without needing to bind at postbuild.mjs
# "-l:libndi.so.5.0.10",
],
},
"copies": [
{
"destination": "$(BUILDTYPE)",
"files": [
"<!@(node -p \"require('./utils/paths').ndi_sdk.lib_dir\")/libndi.so",
]
}
]
}
]
],
"copies": [
{
"destination": "$(BUILDTYPE)/",
"files": [
"<!@(node -p \"require('./utils/paths').ndi_sdk.dir\")/libndi_licenses.txt",
]
}
],
"defines": ['NAPI_CPP_EXCEPTIONS']
}
]
}