Add default target configuration to common.gypi 54/53054/2
authorWonYoung Choi <wy80.choi@samsung.com>
Tue, 1 Dec 2015 09:54:21 +0000 (18:54 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Tue, 1 Dec 2015 10:09:28 +0000 (19:09 +0900)
If the type of target in build.gyp is 'loadable_module',
(target_name).xwalk file will be generated automatically.
'.xwalk' file can be loaded by JSNative directly with require()
without node module wrapper.

Change-Id: If4401f243a07fa17d97d6959a0da4f30012d5b77

tools/build/common.gypi

index e0dc0f3d933fd0098d40ab4dc1b4cdd2df38487e..eab90f1ededf9b792f258ca5a1b336878fb4b8fd 100644 (file)
@@ -4,6 +4,18 @@
     'extension_build_type%': 'Debug',
   },
   'target_defaults': {
+    'type': 'loadable_module',
+    'target_conditions': [
+      ['_type=="loadable_module"', {
+        'product_prefix': '',
+        'product_extension': 'xwalk',
+        'variables': {
+          'packages': [
+            'xwalk-extensions-common',
+          ],
+        },
+      }],
+    ],
     'conditions': [
       ['extension_build_type == "Release"', {
         'defines': ['NDEBUG', ],