forked from REVrobotics/node-can-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
85 lines (85 loc) · 3.2 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': 'addon',
'sources': [
'src/addon.cc',
'src/canWrapper.cc',
],
'include_dirs': [
"src/",
"externalCompileTimeDeps/include",
"<!@(node -p \"require('node-addon-api').include\")"
],
'defines': [
"NAPI_VERSION=<(napi_build_version)"
],
'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
'conditions': [
['OS=="mac"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/darwin-osxuniversal/libCANBridge.dylib',
'<(module_root_dir)/prebuilds/darwin-osxuniversal/libwpiHal.dylib',
'<(module_root_dir)/prebuilds/darwin-osxuniversal/libwpiutil.dylib',
]
}],
}],
['OS=="win"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/CANBridge.lib',
'<(module_root_dir)/externalCompileTimeDeps/wpiHal.lib',
'<(module_root_dir)/externalCompileTimeDeps/wpiutil.lib',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/win32-x64/CANBridge.dll',
'<(module_root_dir)/prebuilds/win32-x64/wpiHal.dll',
'<(module_root_dir)/prebuilds/win32-x64/wpiutil.dll',
]
}],
}],
['OS=="linux"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/linux-x64/libCANBridge.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiHal.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiutil.so',
]
}],
}],
],
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1,
'AdditionalOptions': [ '-std:c++20' ],
'RuntimeLibrary': 0
},
},
"xcode_settings": {
"CLANG_CXX_LANGUAGE_STANDARD": "c++20",
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
"OTHER_CPLUSPLUSFLAGS": ["-fexceptions"],
# 'MACOSX_DEPLOYMENT_TARGET': '14.0',
},
"cflags_cc": ["-std=c++20", '-fexceptions'],
"cflags": ["-std=c++20", '-fexceptions'],
}
]
}