OLD | NEW |
| (Empty) |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'variables': { | |
7 # When including this gypi, the following variables must be set: | |
8 # in_files: | |
9 # An array of json files from which to generate the feature provider. | |
10 # out_dir: | |
11 # The directory to put the generated code in under gen/. | |
12 # out_base_filename: | |
13 # The base filename to use for the generated feature provider; .h and | |
14 # .cc will be appended. | |
15 # feature_class: | |
16 # The name of the class to use for features, e.g. APIFeature. | |
17 # provider_class: | |
18 # The name of the class to use for the feature provider, e.g. | |
19 # APIFeatureProvider | |
20 'compiler_dir': '<(DEPTH)/tools/json_schema_compiler', | |
21 'compiler_script': '<(compiler_dir)/feature_compiler.py', | |
22 }, | |
23 'actions': [ | |
24 { | |
25 # GN version: json_features.gni | |
26 'action_name': 'genfeatures', | |
27 'msvs_external_rule': 1, | |
28 'extension': 'json', | |
29 'inputs': [ | |
30 '<(compiler_dir)/code.py', | |
31 '<(compiler_script)', | |
32 ], | |
33 'outputs': [ | |
34 '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)/<(out_base_filename).cc', | |
35 '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)/<(out_base_filename).h', | |
36 ], | |
37 'action': [ | |
38 'python', | |
39 '<(compiler_script)', | |
40 '<(DEPTH)', | |
41 '<(feature_class)', | |
42 '<(provider_class)', | |
43 '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)', | |
44 '<(out_base_filename)', | |
45 '<@(in_files)', | |
46 ], | |
47 'message': 'Generating C++ code for json feature files', | |
48 'process_outputs_as_sources': 1, | |
49 }, | |
50 ], | |
51 'include_dirs': [ | |
52 '<(SHARED_INTERMEDIATE_DIR)', | |
53 '<(DEPTH)', | |
54 ], | |
55 'direct_dependent_settings': { | |
56 'include_dirs': [ | |
57 '<(SHARED_INTERMEDIATE_DIR)', | |
58 ] | |
59 }, | |
60 # This target exports a hard dependency because it generates header | |
61 # files. | |
62 'hard_dependency': 1, | |
63 } | |
OLD | NEW |