-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbinding.gyp
119 lines (118 loc) · 3.36 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
'targets': [
{
'target_name': 'node-mumble-audio-<@(target_arch)',
'win_delay_load_hook': 'false',
'sources': [
"src/init.cc",
"src/ALCaptureDevice.cpp",
"src/ALCaptureWorker.cpp",
"src/ALPlaybackDevice.cpp",
"src/ALPlaybackWorker.cpp",
"src/ALDeviceEnumeration.cpp",
],
'include_dirs': [
"deps/includes",
"<!(node -e \"require('nan')\")",
"<!(node -e \"require('electron-updater-tools')\")"
],
'conditions': [
['OS=="linux"',
{
'cflags_cc!': [
'-fno-exceptions'
],
'defines': [
'__LINUX_ALSASEQ__'
],
'link_settings': {
'libraries': [
'-lal'
]
}
}
],
['OS=="mac"',
{
'defines': [
'__MACOSX_CORE__'
],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
},
'link_settings': {
'libraries': [
'<(module_root_dir)/deps/bin/<(target_arch)/mac/AL/libopenal.1.16.0.dylib',
]
},
'postbuilds': [
{
'postbuild_name': 'Make Relative Path to libopenal',
'action': [
'install_name_tool',
'-change',
'libopenal.1.16.0.dylib',
'@loader_path/libopenal.1.16.0.dylib',
'<@(PRODUCT_DIR)/node-mumble-audio-<@(target_arch).node'
]
}
]
}
],
['OS=="win"',
{
'defines': [
'__WINDOWS_MM__'
],
'libraries': [
"-lShlwapi.lib",
"<(module_root_dir)/deps/lib/<@(target_arch)/win/AL/OpenAL32.lib"
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [ 'node.dll', 'iojs.exe', 'node.exe' ],
'AdditionalOptions': [ '/ignore:4199' ],
}
}
}
]
]
},
# deploy dependencies
{
'target_name': 'openal_deploy',
'type': 'none',
'dependencies': ['node-mumble-audio-<@(target_arch)'],
'target_conditions': [
[ 'OS=="win"', {
'actions': [
{
'action_name': 'OpenAL32-Copy',
'inputs': [
'<(module_root_dir)/deps/bin/<@(target_arch)/win/AL/OpenAL32.dll'
],
'outputs': [
'<@(PRODUCT_DIR)/OpenAL32.dll'
],
'action': ['cp', '<(module_root_dir)/deps/bin/<@(target_arch)/win/AL/OpenAL32.dll', '<@(PRODUCT_DIR)/OpenAL32.dll']
}
]
}],
[ 'OS=="mac"', {
'actions': [
{
'action_name': 'copy_libopenal',
'inputs': [
'<(module_root_dir)/deps/bin/<@(target_arch)/mac/AL/libopenal.1.16.0.dylib'
],
'outputs': [
'<@(PRODUCT_DIR)/libopenal.1.16.0.dylib'
],
'action': ['cp', '<(module_root_dir)/deps/bin/<@(target_arch)/mac/AL/libopenal.1.16.0.dylib', '<@(PRODUCT_DIR)/libopenal.1.16.0.dylib']
}
]
}]
]
}
]
}