forked from Kitt-AI/snowboy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
85 lines (85 loc) · 2.38 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
{
'targets': [{
'target_name': 'snowboy',
'sources': [
'swig/Node/snowboy.cc'
],
'conditions': [
['OS=="mac"', {
'link_settings': {
'libraries': [
'<(module_root_dir)/lib/osx/libsnowboy-detect.a',
]
}
}],
['OS=="linux" and target_arch=="x64"', {
'link_settings': {
'ldflags': [
'-Wl,--no-as-needed',
],
'libraries': [
'<(module_root_dir)/lib/ubuntu64/libsnowboy-detect.a',
]
}
}],
['OS=="linux" and target_arch=="arm"', {
'link_settings': {
'ldflags': [
'-Wl,--no-as-needed',
],
'libraries': [
'<(module_root_dir)/lib/rpi/libsnowboy-detect.a',
]
}
}],
['OS=="linux" and target_arch=="arm64"', {
'link_settings': {
'ldflags': [
'-Wl,--no-as-needed',
],
'libraries': [
'<(module_root_dir)/lib/aarch64-ubuntu1604/libsnowboy-detect.a',
]
}
}]
],
'cflags': [
'-std=c++11',
'-fexceptions',
'-Wall',
'-D_GLIBCXX_USE_CXX11_ABI=0'
],
'cflags!': [
'-fno-exceptions'
],
'cflags_cc!': [
'-fno-exceptions'
],
'include_dirs': [
"<!(node -e \"require('nan')\")",
"<!(pwd)/include"
],
'libraries': [
'-lcblas'
],
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
'OTHER_CFLAGS': [
'-std=c++11',
'-stdlib=libc++'
]
}
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}]
}