Browse Source

Fix MSVS build

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
d53fccbce5
  1. 12
      tools/gyp_node

12
tools/gyp_node

@ -22,9 +22,17 @@ def run_gyp(args):
if __name__ == '__main__': if __name__ == '__main__':
args = sys.argv[1:] args = sys.argv[1:]
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp'))
options_fn = os.path.abspath(os.path.join(node_root, 'options.gypi')) # GYP bug.
# On msvs it will crash if it gets an absolute path.
# On Mac/make it will crash if it doesn't get an absolute path.
if sys.platform == 'win32':
args.append(os.path.join(node_root, 'node.gyp'))
options_fn = os.path.join(node_root, 'options.gypi')
else:
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp'))
options_fn = os.path.join(os.path.abspath(node_root), 'options.gypi')
if os.path.exists(options_fn): if os.path.exists(options_fn):
args.extend(['-I', options_fn]) args.extend(['-I', options_fn])

Loading…
Cancel
Save