Setting NODE_GYP_DIR for addon.gypi to setting absolute path for src/win_delay_load_hook.c,

and fixes of the long relative path issue on Win32.
Fixes of #636
This commit is contained in:
Yonggang Luo 2015-05-27 12:02:06 +08:00
parent 0b9790ab6b
commit 9a2637e8d8
2 changed files with 3 additions and 1 deletions

View file

@ -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': {

View file

@ -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')