This repository was archived by the owner on Nov 8, 2024. It is now read-only.
forked from frankie-zeng/node_npcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.gyp
More file actions
40 lines (40 loc) · 1.49 KB
/
binding.gyp
File metadata and controls
40 lines (40 loc) · 1.49 KB
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
{
"targets": [
{
"target_name": "pcap_binding",
'win_delay_load_hook': 'true',
"sources": [ "npcap_binding.cpp","npcap_session.cpp"],
"include_dirs": ["npcap/Include","<!@(node -p \"require('node-addon-api').include\")"],
"libraries": [
"<(module_root_dir)/npcap/Lib/x64/Packet.lib",
"<(module_root_dir)/npcap/Lib/x64/wpcap.lib",
"Ws2_32.lib"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS','NAPI_EXPERIMENTAL'],
'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"', {
'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
'sources': [
'<(node_gyp_dir)/src/win_delay_load_hook.cc',
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)','wpcap.dll' ],
# Don't print a linker warning when no imports from either .exe
# are used.
'AdditionalOptions': [ '/ignore:4199' ],
},
},
}],
],
}],
],
}
]
}