Skip to content

Commit 5eb0972

Browse files
committed
configure: use full path in node_lib_file GYP variable
Set path to node lib in `$(Configuration)` dir when `--nodedir` option is supplied, otherwise use value of `target_arch` variable.
1 parent 8db9e57 commit 5eb0972

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

addon.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
'-luuid.lib',
9393
'-lodbc32.lib',
9494
'-lDelayImp.lib',
95-
'-l"<(node_root_dir)/<(target_arch)/<(node_lib_file)"'
95+
'-l"<(node_lib_file)"'
9696
],
9797
'msvs_disabled_warnings': [
9898
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'

lib/configure.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ function configure (gyp, argv, callback) {
257257
output_dir = buildDir
258258
}
259259
var nodeGypDir = path.resolve(__dirname, '..')
260+
var nodeLibFile = path.join(nodeDir,
261+
!gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
262+
release.name + '.lib')
260263

261264
argv.push('-I', addon_gypi)
262265
argv.push('-I', common_gypi)
@@ -267,7 +270,7 @@ function configure (gyp, argv, callback) {
267270
argv.push('-Dnode_exp_file=' + node_exp_file)
268271
}
269272
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
270-
argv.push('-Dnode_lib_file=' + release.name + '.lib')
273+
argv.push('-Dnode_lib_file=' + nodeLibFile)
271274
argv.push('-Dmodule_root_dir=' + process.cwd())
272275
argv.push('--depth=.')
273276
argv.push('--no-parallel')

0 commit comments

Comments
 (0)