Skip to content

Commit 386746c

Browse files
pmedjoaocgreis
authored andcommitted
configure: use full path in node_lib_file GYP var
Set path to node lib in `$(Configuration)` dir when `--nodedir` option is supplied, otherwise use value of `target_arch` variable. PR-URL: #964 Reviewed-By: João Reis <[email protected]>
1 parent 0913b2d commit 386746c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

addon.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
'-luuid.lib',
110110
'-lodbc32.lib',
111111
'-lDelayImp.lib',
112-
'-l"<(node_root_dir)/<(target_arch)/<(node_lib_file)"'
112+
'-l"<(node_lib_file)"'
113113
],
114114
'msvs_disabled_warnings': [
115115
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'

lib/configure.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ function configure (gyp, argv, callback) {
283283
output_dir = buildDir
284284
}
285285
var nodeGypDir = path.resolve(__dirname, '..')
286+
var nodeLibFile = path.join(nodeDir,
287+
!gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
288+
release.name + '.lib')
286289

287290
argv.push('-I', addon_gypi)
288291
argv.push('-I', common_gypi)
@@ -293,7 +296,7 @@ function configure (gyp, argv, callback) {
293296
argv.push('-Dnode_exp_file=' + node_exp_file)
294297
}
295298
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
296-
argv.push('-Dnode_lib_file=' + release.name + '.lib')
299+
argv.push('-Dnode_lib_file=' + nodeLibFile)
297300
argv.push('-Dmodule_root_dir=' + process.cwd())
298301
argv.push('-Dnode_engine=' +
299302
(gyp.opts.node_engine || process.jsEngine || 'v8'))

0 commit comments

Comments
 (0)