forked from LabSound/LabSound
-
Notifications
You must be signed in to change notification settings - Fork 3
/
binding.gyp
90 lines (89 loc) · 3.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
'targets': [
{
'target_name': 'webaudio',
'sources': [
'main.cpp',
"<!@(node -p \"require('fs').readdirSync('./lib/src').map(f=>'lib/src/'+f).join(' ')\")"
],
'include_dirs': [
"<!(node -e \"require('nan')\")",
'<(module_root_dir)/lib/include',
'<(module_root_dir)/labsound/include',
'<(module_root_dir)/labsound/third_party',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/include')\")"
],
'conditions': [
['OS=="linux"', {
'library_dirs': [
'<(module_root_dir)/labsound/bin',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/linux')\")",
],
'libraries': [
'-lLabSound',
# '-ljack',
'-lasound',
# '-lpulse',
# '-lpulse-simple',
'-lavformat',
'-lavcodec',
'-lavutil',
'-lswscale',
'-lswresample',
],
'ldflags': [
'-Wl,-Bsymbolic',
],
}],
['OS=="win"', {
'library_dirs': [
'<(module_root_dir)/labsound/build/x64/Release',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win')\")",
],
'libraries': [
'LabSound.lib',
'avformat.lib',
'avcodec.lib',
'avutil.lib',
'swscale.lib',
'swresample.lib',
],
'copies': [
{
'destination': '<(module_root_dir)/build/Release/',
'files': [
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avformat-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avcodec-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avutil-56.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swscale-5.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swresample-3.dll')\")",
]
}
],
}],
['OS=="mac"', {
'library_dirs': [
'<(module_root_dir)/labsound/bin',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/macos')\")",
],
'libraries': [
'-framework Cocoa',
'-framework Accelerate',
'-framework CoreAudio',
'-framework AudioUnit',
'-framework AudioToolbox',
'-llabsound',
'-lavcodec',
'-lavformat',
'-lswscale',
'-lavresample',
'-lavutil'
],
'library_dirs': [
'<(module_root_dir)/labsound/bin',
],
}],
],
}
]
}