From 4e676973b47b4db00dd800a5b19e2af645a2414c Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Tue, 1 Dec 2015 18:54:21 +0900 Subject: [PATCH] Add default target configuration to common.gypi 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/build/common.gypi b/tools/build/common.gypi index e0dc0f3..eab90f1 100644 --- a/tools/build/common.gypi +++ b/tools/build/common.gypi @@ -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', ], -- 2.34.1