From 43212f4de33bc995be1c13fa768b3ef1e0e3fac1 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Fri, 6 Jan 2012 15:48:23 -0800 Subject: [PATCH] Include the node.lib file at link time on Windows. Makes the basic `gyp_addon` script work with Windows. The "Debug" dir is currently hard-coded. A better way would be to use the currently selected "configuration" that gyp is executing, but I could not figure out how to get a variable of the configuration... --- tools/addon.gypi | 3 +++ tools/gyp_addon | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/addon.gypi b/tools/addon.gypi index e7152afe4bf..78e6fe90e78 100644 --- a/tools/addon.gypi +++ b/tools/addon.gypi @@ -12,6 +12,9 @@ 'conditions': [ [ 'OS=="mac"', { 'libraries': [ '-undefined dynamic_lookup' ], + }], + [ 'OS=="win"', { + 'libraries': [ '-l<(node_root_dir>/Debug/node.lib' ], }] ] } diff --git a/tools/gyp_addon b/tools/gyp_addon index a93f7b27d91..2dac0e004dd 100755 --- a/tools/gyp_addon +++ b/tools/gyp_addon @@ -16,6 +16,7 @@ if __name__ == '__main__': args.extend(['-I', common_gypi]) args.extend(['-Dlibrary=shared_library']) args.extend(['-Dvisibility=default']) + args.extend(['-Dnode_root_dir=%s' % node_root]) args.extend(['--depth=.']); gyp_args = list(args)