Skip to content

Commit

Permalink
Setting NODE_GYP_DIR for addon.gypi to setting absolute path for src/…
Browse files Browse the repository at this point in the history
…win_delay_load_hook.c,

and fixes of the long relative path issue on Win32.
Fixes of #636
  • Loading branch information
lygstate committed May 31, 2015
1 parent 0b9790a commit 9a2637e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'conditions': [
[ 'OS=="win"', {
'sources': [
'src/win_delay_load_hook.c',
'<(node_gyp_dir)/src/win_delay_load_hook.c',
],
'msvs_settings': {
'VCLinkerTool': {
Expand Down
2 changes: 2 additions & 0 deletions lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,14 @@ function configure (gyp, argv, callback) {
// Windows expects an absolute path
output_dir = buildDir
}
var nodeGypDir = path.resolve(__dirname, '..')

argv.push('-I', addon_gypi)
argv.push('-I', common_gypi)
argv.push('-Dlibrary=shared_library')
argv.push('-Dvisibility=default')
argv.push('-Dnode_root_dir=' + nodeDir)
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
argv.push('-Dmodule_root_dir=' + process.cwd())
argv.push('--depth=.')
argv.push('--no-parallel')
Expand Down

0 comments on commit 9a2637e

Please sign in to comment.