3b75934996297f9f76820734d580a3f4e5c11eb4
[platform/framework/web/crosswalk.git] / src / xwalk / xwalk_jsapi.gypi
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Copyright (c) 2013 Intel Corporation. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 {
7   'variables': {
8     'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
9     'api_gen': '<(api_gen_dir)/compiler.py',
10     'root_namespace': 'xwalk::jsapi::%(namespace)s',
11     'jsapi_component%': '',
12   },
13   'rules': [
14     {
15       'rule_name': 'genapi_idl',
16       'msvs_external_rule': 1,
17       'extension': 'idl',
18       'inputs': [
19         '<(api_gen_dir)/cc_generator.py',
20         '<(api_gen_dir)/code.py',
21         '<(api_gen_dir)/compiler.py',
22         '<(api_gen_dir)/cpp_generator.py',
23         '<(api_gen_dir)/cpp_type_generator.py',
24         '<(api_gen_dir)/cpp_util.py',
25         '<(api_gen_dir)/h_generator.py',
26         '<(api_gen_dir)/idl_schema.py',
27         '<(api_gen_dir)/model.py',
28         '<(api_gen_dir)/util.cc',
29         '<(api_gen_dir)/util.h',
30         '<(api_gen_dir)/util_cc_helper.py',
31       ],
32       'outputs': [
33         '<(SHARED_INTERMEDIATE_DIR)/xwalk/<(jsapi_component)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc',
34         '<(SHARED_INTERMEDIATE_DIR)/xwalk/<(jsapi_component)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).h',
35       ],
36       'action': [
37         'python',
38         '<(api_gen)',
39         '<(RULE_INPUT_PATH)',
40         '--root=.',
41         '--destdir=<(SHARED_INTERMEDIATE_DIR)/xwalk/<(jsapi_component)',
42         '--namespace=<(root_namespace)',
43         '--generator=cpp',
44       ],
45       'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files',
46       'process_outputs_as_sources': 1,
47     },
48   ],
49   'include_dirs': [
50     '<(SHARED_INTERMEDIATE_DIR)',
51     '<(SHARED_INTERMEDIATE_DIR)/xwalk/<(jsapi_component)',
52     '<(DEPTH)',
53   ],
54   'dependencies':[
55     '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
56   ],
57   'direct_dependent_settings': {
58     'include_dirs': [
59       '<(SHARED_INTERMEDIATE_DIR)',
60     ]
61   },
62   'hard_dependency': 1,
63 }