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 27, 2015
1 parent 26b7377 commit 4989864
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 bin/node-gyp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ process.title = 'node-gyp'

var gyp = require('../')
var log = require('npmlog')
var path = require("path");

/**
* Process and execute the selected commands.
Expand All @@ -20,6 +21,7 @@ var log = require('npmlog')
var prog = gyp()
var completed = false
prog.parseArgv(process.argv)
process.env['NODE_GYP_DIR'] = path.resolve(__dirname, '..');

if (prog.todo.length === 0) {
if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
Expand Down

0 comments on commit 4989864

Please sign in to comment.