|  | 
| 196 | 196 |           'dependencies': [ 'node_aix_shared' ], | 
| 197 | 197 |         }, { | 
| 198 | 198 |           'dependencies': [ '<(node_lib_target_name)' ], | 
|  | 199 | +          'conditions': [ | 
|  | 200 | +            ['OS=="win" and node_shared=="true"', { | 
|  | 201 | +              'dependencies': ['generate_node_def'], | 
|  | 202 | +              'msvs_settings': { | 
|  | 203 | +                'VCLinkerTool': { | 
|  | 204 | +                  'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | 
|  | 205 | +                }, | 
|  | 206 | +              }, | 
|  | 207 | +            }], | 
|  | 208 | +          ], | 
| 199 | 209 |         }], | 
| 200 | 210 |         [ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', { | 
| 201 | 211 |           'xcode_settings': { | 
|  | 
| 235 | 245 |         }], | 
| 236 | 246 |         [ 'node_shared=="true"', { | 
| 237 | 247 |           'xcode_settings': { | 
| 238 |  | -            'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ], | 
|  | 248 | +            'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', '-Wl,-rpath,@loader_path/../lib'], | 
| 239 | 249 |           }, | 
|  | 250 | +          'conditions': [ | 
|  | 251 | +            ['OS=="linux"', { | 
|  | 252 | +               'ldflags': [ | 
|  | 253 | +                 '-Wl,-rpath,\\$$ORIGIN/../lib' | 
|  | 254 | +               ], | 
|  | 255 | +            }], | 
|  | 256 | +          ], | 
| 240 | 257 |         }], | 
| 241 | 258 |         [ 'enable_lto=="true"', { | 
| 242 | 259 |           'xcode_settings': { | 
|  | 
| 751 | 768 |           'libraries': [ | 
| 752 | 769 |             'Dbghelp', | 
| 753 | 770 |             'Psapi', | 
|  | 771 | +            'Winmm', | 
| 754 | 772 |             'Ws2_32', | 
| 755 | 773 |           ], | 
| 756 | 774 |         }], | 
|  | 
| 1504 | 1522 |         }, | 
| 1505 | 1523 |       ] | 
| 1506 | 1524 |     }], # end aix section | 
|  | 1525 | +    ['OS=="win" and node_shared=="true"', { | 
|  | 1526 | +     'targets': [ | 
|  | 1527 | +       { | 
|  | 1528 | +         'target_name': 'gen_node_def', | 
|  | 1529 | +         'type': 'executable', | 
|  | 1530 | +         'sources': [ | 
|  | 1531 | +           'tools/gen_node_def.cc' | 
|  | 1532 | +         ], | 
|  | 1533 | +       }, | 
|  | 1534 | +       { | 
|  | 1535 | +         'target_name': 'generate_node_def', | 
|  | 1536 | +         'dependencies': [ | 
|  | 1537 | +           'gen_node_def', | 
|  | 1538 | +           '<(node_lib_target_name)', | 
|  | 1539 | +         ], | 
|  | 1540 | +         'type': 'none', | 
|  | 1541 | +         'actions': [ | 
|  | 1542 | +           { | 
|  | 1543 | +             'action_name': 'generate_node_def_action', | 
|  | 1544 | +             'inputs': [ | 
|  | 1545 | +               '<(PRODUCT_DIR)/<(node_lib_target_name).dll' | 
|  | 1546 | +             ], | 
|  | 1547 | +             'outputs': [ | 
|  | 1548 | +               '<(PRODUCT_DIR)/<(node_core_target_name).def', | 
|  | 1549 | +             ], | 
|  | 1550 | +             'action': [ | 
|  | 1551 | +               '<(PRODUCT_DIR)/gen_node_def.exe', | 
|  | 1552 | +               '<@(_inputs)', | 
|  | 1553 | +               '<@(_outputs)', | 
|  | 1554 | +             ], | 
|  | 1555 | +           }, | 
|  | 1556 | +         ], | 
|  | 1557 | +       }, | 
|  | 1558 | +     ], | 
|  | 1559 | +   }], # end win section | 
| 1507 | 1560 |   ], # end conditions block | 
| 1508 | 1561 | } | 
0 commit comments