node-serialport-bindings-cpp/binding.gyp
Francis Gulotta 7a8b86fdb9
fix: update build tools and fix arm64 build for rpi (#111)
Two problems to fix with this one
- our rpi arm64 isn't working possibly because our libc is too new, so we'll target the lts of arm64, worked for [level](https://github.com/Level/classic-level/pull/71) thankful for [their investigation](https://github.com/Level/classic-level/issues/69)
- our arm64 builds were just broken and wouldn't build so we're fixing that with a variable in our binding.gyp for `openssl_fips`

When this is released it will hopefully fix https://github.com/serialport/node-serialport/issues/2438
2023-04-19 23:22:09 -04:00

80 lines
1.8 KiB
Python

{
'variables': {
'openssl_fips': ''
},
'targets': [{
'target_name': 'bindings',
'sources': [
'src/serialport.cpp'
],
'include_dirs': ["<!(node -p \"require('node-addon-api').include_dir\")"],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
"defines": ["NAPI_CPP_EXCEPTIONS"],
'conditions': [
['OS=="win"',
{
'defines': ['CHECK_NODE_MODULE_VERSION'],
'sources': [
'src/serialport_win.cpp'
],
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': '1',
'DisableSpecificWarnings': [ '4530', '4506' ],
}
}
}
],
['OS=="mac"',
{
'sources': [
'src/serialport_unix.cpp',
'src/poller.cpp',
'src/darwin_list.cpp'
],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'OTHER_CFLAGS': [
'-arch x86_64',
'-arch arm64'
],
'OTHER_LDFLAGS': [
'-framework CoreFoundation',
'-framework IOKit',
'-arch x86_64',
'-arch arm64'
]
}
}
],
['OS=="linux"',
{
'sources': [
'src/serialport_unix.cpp',
'src/poller.cpp',
'src/serialport_linux.cpp'
]
}
],
['OS=="android"',
{
'sources': [
'src/serialport_unix.cpp',
'src/poller.cpp',
'src/serialport_linux.cpp'
]
}
],
['OS!="win"',
{
'sources': [
'src/serialport_unix.cpp',
'src/poller.cpp'
]
}
]
]
}],
}