diff --git a/node.gyp b/node.gyp index 3c6a85737078c0..820fcef7cb28e1 100644 --- a/node.gyp +++ b/node.gyp @@ -23,6 +23,7 @@ 'node_shared_openssl%': 'false', 'node_v8_options%': '', 'node_core_target_name%': 'node', + 'node_target_type%': 'executable', 'node_lib_target_name%': 'libnode', 'node_intermediate_lib_type%': 'static_library', 'node_builtin_modules_path%': '', @@ -251,14 +252,16 @@ [ 'node_shared=="true"', { 'node_target_type%': 'shared_library', 'conditions': [ - ['OS=="aix"', { + ['OS in ("aix", "win")', { # For AIX, always generate static library first, # It needs an extra step to generate exp and # then use both static lib and exp to create # shared lib. - 'node_intermediate_lib_type': 'static_library', + # For Windows, always generate static library, + # which is necessary to compile node.dll + 'node_intermediate_lib_type%': 'static_library', }, { - 'node_intermediate_lib_type': 'shared_library', + 'node_intermediate_lib_type%': 'shared_library', }], ], }, { @@ -313,7 +316,7 @@ 'targets': [ { 'target_name': '<(node_core_target_name)', - 'type': 'executable', + 'type': '<(node_target_type)', 'defines': [ 'NODE_WANT_INTERNALS=1', @@ -746,6 +749,7 @@ 'libraries': [ 'Dbghelp', 'Psapi', + 'Winmm', ], }], [ 'node_use_etw=="true"', {