{
'targets': [
{
'target_name': 'sophis-c-client-native',
'sources': [ 'src/sophis_c_client.cc' ],
'include_dirs': ["<!@(node -p \"require('node-addon-api').include\")"],
'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7'
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
}
}
]
}
2012: https://gist.github.com/mateodelnorte/67f124196377a0ca0815c66644bf1082
2013: https://gist.github.com/mateodelnorte/5475b1d28f902e501a29686cf7c91082
2015: https://gist.github.com/mateodelnorte/8c49520a883d7fb20ef8be784ac10a9a
I'm using the a basic, unmodified project created using the yoeman generator napi module plugin.
Here's my binding.gyp: