forked from serenadeai/speech-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
143 lines (143 loc) · 6.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"targets": [
{
"target_name": "speechrecorder",
"sources": ["src/speech_recorder.cpp"],
"cflags!": [
"-fno-exceptions",
"-fno-rtti",
],
"cflags_cc!": [
"-fno-exceptions",
"-fno-rtti",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
"<(module_root_dir)/include",
"<(module_root_dir)/lib/include",
"<(module_root_dir)/lib/build/_deps/drwav-src",
"<(module_root_dir)/lib/build/_deps/readerwriterqueue-src",
"<(module_root_dir)/lib/3rd_party/webrtcvad",
"<(module_root_dir)/lib/3rd_party/portaudio/include",
"<(module_root_dir)/lib/3rd_party/onnxruntime/include",
],
"defines": [
"NAPI_VERSION=<(napi_build_version)",
"NAPI_CPP_EXCEPTIONS",
],
"conditions": [
[
'OS=="mac"',
{
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_ENABLE_CPP_RTTI": "YES",
"MACOSX_DEPLOYMENT_TARGET": "10.14",
"OTHER_LDFLAGS": ["-Wl,-rpath,@loader_path/"],
},
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": [
"<(module_root_dir)/lib/install/lib/libspeechrecorder.dylib",
"<(module_root_dir)/lib/install/lib/libportaudio.dylib",
"<(module_root_dir)/lib/install/lib/libonnxruntime.1.10.0.dylib",
],
}
],
"libraries": [
"<(module_root_dir)/build/Release/libspeechrecorder.dylib",
"<(module_root_dir)/build/Release/libportaudio.dylib",
"<(module_root_dir)/build/Release/libonnxruntime.1.10.0.dylib",
],
},
],
[
'OS=="win"',
{
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
},
},
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": [
"<(module_root_dir)/lib/install/lib/speechrecorder.dll",
"<(module_root_dir)/lib/install/lib/onnxruntime.dll",
"<(module_root_dir)/lib/install/lib/onnxruntime_providers_shared.dll",
],
}
],
"libraries": [
"<(module_root_dir)/lib/install/lib/speechrecorder.lib",
"<(module_root_dir)/lib/install/lib/onnxruntime.lib",
"<(module_root_dir)/lib/install/lib/onnxruntime_providers_shared.lib",
],
},
],
[
'OS=="win" and target_arch=="ia32"',
{
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": [
"<(module_root_dir)/lib/install/lib/portaudio_x86.dll",
"<(module_root_dir)/lib/3rd_party/vcruntime/x86/vcruntime140.dll",
],
}
],
"libraries": [
"<(module_root_dir)/lib/install/lib/portaudio_x86.lib",
],
},
],
[
'OS=="win" and target_arch=="x64"',
{
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": [
"<(module_root_dir)/lib/install/lib/portaudio_x64.dll",
"<(module_root_dir)/lib/3rd_party/vcruntime/x64/vcruntime140.dll",
"<(module_root_dir)/lib/3rd_party/vcruntime/x64/vcruntime140_1.dll",
],
}
],
"libraries": [
"<(module_root_dir)/lib/install/lib/portaudio_x64.lib",
],
},
],
[
'OS=="linux"',
{
"link_settings": {
"libraries": [
"-Wl,-rpath,'$$ORIGIN'",
]
},
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": [
"<(module_root_dir)/lib/install/lib/libspeechrecorder.so",
"<(module_root_dir)/lib/install/lib/libportaudio.so",
"<(module_root_dir)/lib/install/lib/libonnxruntime.so.1.10.0",
],
}
],
"libraries": [
"<(module_root_dir)/build/Release/libspeechrecorder.so",
"<(module_root_dir)/build/Release/libportaudio.so",
"<(module_root_dir)/build/Release/libonnxruntime.so.1.10.0",
],
},
],
],
}
]
}