-
Notifications
You must be signed in to change notification settings - Fork 70
/
binding.gyp
54 lines (54 loc) · 1.58 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
{
'variables': {
'use_system_libnanomsg%': 'false',
'asan': 'false',
},
'targets': [
{
'target_name': 'node_nanomsg',
'sources': [
'src/node_nanomsg.cc',
'src/poll_ctx.cc'
],
'include_dirs': [
"<!(node -e \"require('nan')\")",
],
'conditions': [
['use_system_libnanomsg=="false"', {
'dependencies': [ 'deps/nanomsg.gyp:nanomsg', ],
}],
['OS=="linux" and use_system_libnanomsg=="true"', {
'include_dirs+': [
'<!@(pkg-config nanomsg --cflags-only-I | sed s/-I//g)/nanomsg || echo "")',
'<!@(pkg-config libnanomsg --cflags | sed s/-I//g || echo "")',
],
'libraries': [
'<!@(pkg-config nanomsg --libs || echo "")',
'<!@(pkg-config libnanomsg --libs || echo "")',
],
}],
['OS=="mac" and use_system_libnanomsg=="true"', {
'include_dirs+': [
'<!@(pkg-config libnanomsg --cflags | sed s/-I//g || echo "")',
'<!@(pkg-config nanomsg --cflags | sed s/-I//g || echo "")',
],
'libraries': [
'<!@(pkg-config libnanomsg --libs || echo "")',
'<!@(pkg-config nanomsg --libs || echo "")',
],
}],
['OS=="mac" and asan=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'-fsanitize=address'
]
}
}],
['OS=="win"', {
'cflags': [ '-Wall -Werror -Wno-unused' ],
'cflags_cc': ['-fexceptions'],
}],
],
},
],
}