Skip to content

Commit

Permalink
configure: use full path in node_lib_file GYP var
Browse files Browse the repository at this point in the history
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 <reis@janeasystems.com>
  • Loading branch information
pmed authored and joaocgreis committed May 15, 2017
1 parent 0913b2d commit 386746c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
'-luuid.lib',
'-lodbc32.lib',
'-lDelayImp.lib',
'-l"<(node_root_dir)/<(target_arch)/<(node_lib_file)"'
'-l"<(node_lib_file)"'
],
'msvs_disabled_warnings': [
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
Expand Down
5 changes: 4 additions & 1 deletion lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ function configure (gyp, argv, callback) {
output_dir = buildDir
}
var nodeGypDir = path.resolve(__dirname, '..')
var nodeLibFile = path.join(nodeDir,
!gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
release.name + '.lib')

argv.push('-I', addon_gypi)
argv.push('-I', common_gypi)
Expand All @@ -293,7 +296,7 @@ function configure (gyp, argv, callback) {
argv.push('-Dnode_exp_file=' + node_exp_file)
}
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
argv.push('-Dnode_lib_file=' + release.name + '.lib')
argv.push('-Dnode_lib_file=' + nodeLibFile)
argv.push('-Dmodule_root_dir=' + process.cwd())
argv.push('-Dnode_engine=' +
(gyp.opts.node_engine || process.jsEngine || 'v8'))
Expand Down

0 comments on commit 386746c

Please sign in to comment.