-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
50 lines (50 loc) · 1.82 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
{
"targets": [
{
"target_name": "profinetdcp",
"sources": [ "src/module.cc", "src/interfaces.cc", "src/dcp.cc" ],
"include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")" ],
"cflags_cc": [ "-fno-exceptions", "-Wno-missing-field-initializers" ],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
'conditions': [
[
'OS=="win"', {
'include_dirs': [ 'winpcap/Include' ],
'defines': [ 'WPCAP' ],
'sources': [ 'src/platform_windows.cc' ],
'conditions': [
[
'target_arch=="ia32"',
{ 'link_settings': { 'libraries': [ 'ws2_32.lib', 'IPHLPAPI.lib', '<(PRODUCT_DIR)/../../winpcap/Lib/wpcap.lib' ]}},
{ 'link_settings': { 'libraries': [ 'ws2_32.lib', 'IPHLPAPI.lib', '<(PRODUCT_DIR)/../../winpcap/Lib/x64/wpcap.lib' ]}}]
]
}, {
'sources': [ 'src/platform_linux.cc' ],
'link_settings': { 'libraries': [ '-lpcap' ] }
}
]
],
'target_conditions': [
['_win_delay_load_hook=="true"', {
# If the addon specifies `'win_delay_load_hook': 'true'` in its
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
# that the addon will work regardless of whether the node/iojs binary
# is named node.exe, iojs.exe, or something else.
'conditions': [
[ 'OS=="win"', {
'sources': [
'<(node_gyp_dir)/src/win_delay_load_hook.cc',
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [ 'wpcap.dll' ],
'AdditionalOptions': [ '/ignore:4199' ]
}
}
}]
]}
]
]
}
]
}