-
Notifications
You must be signed in to change notification settings - Fork 5
/
binding.gyp
71 lines (71 loc) · 1.55 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
{
'variables': {
'rootdir': '<!(node -p "process.cwd()")',
},
'targets': [{
'target_name': 'addon',
'sources': [
'addon.cc',
],
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
],
'include_dirs': [
'<!@(node -p "require(\'node-addon-api\').include")',
'<(rootdir)/gn/src',
],
'libraries': [
'<(rootdir)/gn/out/base<(STATIC_LIB_SUFFIX)',
'<(rootdir)/gn/out/gn_lib<(STATIC_LIB_SUFFIX)',
],
'cflags_cc': [
'-std=c++17',
'-Wall',
'-Wextra',
'-Werror',
'-Wno-unused-parameter',
'-Wno-deprecated-copy',
],
'conditions': [
['OS=="linux"', {
'libraries+': [
'-Wl,--start-group',
],
'libraries': [
'-Wl,--end-group',
],
}],
['OS=="mac"', {
'xcode_settings': {
'CLANG_CXX_LANGUAGE_STANDARD': 'c++17',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
'OTHER_CPLUSPLUSFLAGS': [
'$(inherited)',
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
],
},
}],
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'WarningLevel': '4',
'WarnAsError': 'true',
'DisableSpecificWarnings': [
'4100',
'4127',
],
'AdditionalOptions': [
'-std:c++17',
],
},
},
'libraries': [
'ws2_32.lib',
'shlwapi.lib',
],
}],
],
}]
}