Skip to content

Commit 1bbdeea

Browse files
committed
gyp: add common targets
1 parent 7e1aa06 commit 1bbdeea

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const includeDir = path.relative('.', __dirname);
55
module.exports = {
66
include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
77
include_dir: includeDir,
8-
gyp: path.join(includeDir, 'node_api.gyp:nothing'),
8+
gyp: path.join(includeDir, 'node_addon_api.gyp'),
99
isNodeApiBuiltin: true,
1010
needsFlag: false
1111
};

node_addon_api.gyp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
'targets': [
3+
{
4+
'target_name': 'node-addon-api',
5+
'type': 'none',
6+
'sources': [ 'napi.h', 'napi-inl.h' ],
7+
'direct_dependent_settings': {
8+
'include_dirs': [ '.' ],
9+
'includes': ['noexcept.gypi'],
10+
}
11+
},
12+
{
13+
'target_name': 'node-addon-api-except',
14+
'type': 'none',
15+
'sources': [ 'napi.h', 'napi-inl.h' ],
16+
'direct_dependent_settings': {
17+
'include_dirs': [ '.' ],
18+
'includes': ['except.gypi'],
19+
}
20+
}
21+
]
22+
}

0 commit comments

Comments
 (0)