Skip to content

Commit

Permalink
gyp: add common targets
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Oct 9, 2023
1 parent 7e1aa06 commit 1bbdeea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const includeDir = path.relative('.', __dirname);
module.exports = {
include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
include_dir: includeDir,
gyp: path.join(includeDir, 'node_api.gyp:nothing'),
gyp: path.join(includeDir, 'node_addon_api.gyp'),
isNodeApiBuiltin: true,
needsFlag: false
};
22 changes: 22 additions & 0 deletions node_addon_api.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
'targets': [
{
'target_name': 'node-addon-api',
'type': 'none',
'sources': [ 'napi.h', 'napi-inl.h' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
'includes': ['noexcept.gypi'],
}
},
{
'target_name': 'node-addon-api-except',
'type': 'none',
'sources': [ 'napi.h', 'napi-inl.h' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
'includes': ['except.gypi'],
}
}
]
}

0 comments on commit 1bbdeea

Please sign in to comment.