-
Notifications
You must be signed in to change notification settings - Fork 58
/
binding.gyp
72 lines (72 loc) · 2.46 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
{
"targets": [{
"target_name": "node_snap7",
"include_dirs": [
"<!(node -e \"require('nan')\")",
"./src"
],
"sources": [
"./src/node_snap7.cpp",
"./src/node_snap7_client.cpp",
"./src/node_snap7_server.cpp",
"./src/snap7.cpp"
],
"conditions": [
["OS=='win'", {
"libraries": ["-lws2_32.lib", "-lwinmm.lib"],
"defines": ["_WINSOCK_DEPRECATED_NO_WARNINGS", "_HAS_EXCEPTIONS=0"] # Make sure the STL doesn't try to use exceptions
}]
],
"dependencies": [
"snap7"
]
}, {
"target_name": "snap7",
"type": "static_library",
"include_dirs": [
"./deps/snap7/src/sys",
"./deps/snap7/src/core",
"./deps/snap7/src/lib"
],
"sources": [
"./deps/snap7/src/sys/snap_msgsock.cpp",
"./deps/snap7/src/sys/snap_sysutils.cpp",
"./deps/snap7/src/sys/snap_tcpsrvr.cpp",
"./deps/snap7/src/sys/snap_threads.cpp",
"./deps/snap7/src/core/s7_client.cpp",
"./deps/snap7/src/core/s7_isotcp.cpp",
"./deps/snap7/src/core/s7_partner.cpp",
"./deps/snap7/src/core/s7_peer.cpp",
"./deps/snap7/src/core/s7_server.cpp",
"./deps/snap7/src/core/s7_text.cpp",
"./deps/snap7/src/core/s7_micro_client.cpp",
"./deps/snap7/src/lib/snap7_libmain.cpp"
],
"conditions": [
["OS=='linux' or OS=='freebsd'", {
"cflags_cc": ["-fPIC", "-pedantic", "-fexceptions"],
"cflags_cc!": ["-fno-exceptions"]
}],
["OS=='win'", {
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
"AdditionalOptions": ["/EHsc"] # ExceptionHandling=1 is not enough for some versions
}
},
"defines!": ["_HAS_EXCEPTIONS=0"],
"defines": ["_WINSOCK_DEPRECATED_NO_WARNINGS"]
}],
["OS=='mac'", {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_DYNAMIC_NO_PIC": "NO",
"OTHER_CFLAGS": ["-pedantic"]
}
}]
]
}],
'variables' : {
'openssl_fips': '',
}
}