Generate node.lib from atom.lib and chromiumcontent.dll.lib.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 08:37:01 +0000 (16:37 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 08:37:01 +0000 (16:37 +0800)
atom.gyp

index 7f264fb..165123b 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
         },  # target helper
       ],
     }],  # OS==Mac
+    ['OS=="win"', {
+      'targets': [
+        {
+          'target_name': 'generate_node_lib',
+          'type': 'none',
+          'dependencies': [
+            '<(project_name)',
+          ],
+          'actions': [
+            {
+              'action_name': 'Create node.lib',
+              'inputs': [
+                '<(PRODUCT_DIR)/atom.lib',
+                '<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
+              ],
+              'outputs': [
+                '<(PRODUCT_DIR)/node.lib',
+              ],
+              'action': [
+                'lib.exe',
+                '/nologo',
+                # We can't use <(_outputs) here because that escapes the
+                # backslash in the path, which confuses lib.exe.
+                '/OUT:<(PRODUCT_DIR)\\node.lib',
+                '<@(_inputs)',
+              ],
+              'msvs_cygwin_shell': 0,
+            },
+          ],
+        },  # target generate_node_lib
+      ],
+    }],  # OS==win
   ],
 }