OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Defines a static library corresponding to the output of schema compiler tools | 5 # Defines a static library corresponding to the output of schema compiler tools |
6 # over a set of extensions API schemas (IDL or JSON format.) The library target | 6 # over a set of extensions API schemas (IDL or JSON format.) The library target |
7 # has implicit hard dependencies on all schema files listed by the invoker and | 7 # has implicit hard dependencies on all schema files listed by the invoker and |
8 # is itself a hard dependency. | 8 # is itself a hard dependency. |
9 # | 9 # |
10 # Invocations of this template may use the following variables: | 10 # Invocations of this template may use the following variables: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 # A list of schema files which should not be compiled, but which should still | 42 # A list of schema files which should not be compiled, but which should still |
43 # be processed for API bundle generation. | 43 # be processed for API bundle generation. |
44 # | 44 # |
45 # deps [optional] | 45 # deps [optional] |
46 # If any deps are specified they will be inherited by the static library | 46 # If any deps are specified they will be inherited by the static library |
47 # target. | 47 # target. |
48 # | 48 # |
49 # The static library target also inherits the visibility and output_name | 49 # The static library target also inherits the visibility and output_name |
50 # of its invoker. | 50 # of its invoker. |
51 | 51 |
52 template("generated_extensions_api") { | 52 template("json_schema_compile") { |
53 assert(defined(invoker.sources), | 53 assert(defined(invoker.sources), |
54 "\"sources\" must be defined for the $target_name template.") | 54 "\"sources\" must be defined for the $target_name template.") |
55 assert(defined(invoker.root_namespace), | 55 assert(defined(invoker.root_namespace), |
56 "\"root_namespace\" must be defined for the $target_name template.") | 56 "\"root_namespace\" must be defined for the $target_name template.") |
57 | 57 |
58 schemas = defined(invoker.schemas) && invoker.schemas | 58 schemas = defined(invoker.schemas) && invoker.schemas |
59 bundle = defined(invoker.bundle) && invoker.bundle | 59 bundle = defined(invoker.bundle) && invoker.bundle |
60 bundle_registration = defined(invoker.bundle_registration) && | 60 bundle_registration = defined(invoker.bundle_registration) && |
61 invoker.bundle_registration | 61 invoker.bundle_registration |
62 | 62 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 direct_dependent_configs = [ ":$generated_config_name" ] | 200 direct_dependent_configs = [ ":$generated_config_name" ] |
201 | 201 |
202 if (defined(invoker.visibility)) { | 202 if (defined(invoker.visibility)) { |
203 visibility = invoker.visibility | 203 visibility = invoker.visibility |
204 } | 204 } |
205 if (defined(invoker.output_name)) { | 205 if (defined(invoker.output_name)) { |
206 output_name = invoker.output_name | 206 output_name = invoker.output_name |
207 } | 207 } |
208 } | 208 } |
209 } | 209 } |
OLD | NEW |