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 29 matching lines...) Expand all Loading... |
40 # The path containing C++ implementations of API functions. This path is | 40 # The path containing C++ implementations of API functions. This path is |
41 # used as the root path when looking for {schema}/{schema}_api.h headers | 41 # used as the root path when looking for {schema}/{schema}_api.h headers |
42 # when generating API registration bundles. Such headers, if found, are | 42 # when generating API registration bundles. Such headers, if found, are |
43 # automatically included by the generated code. | 43 # automatically included by the generated code. |
44 # | 44 # |
45 # uncompiled_sources [optional, only used when bundle = true or | 45 # uncompiled_sources [optional, only used when bundle = true or |
46 # bundle_registration = true] | 46 # bundle_registration = true] |
47 # A list of schema files which should not be compiled, but which should still | 47 # A list of schema files which should not be compiled, but which should still |
48 # be processed for API bundle generation. | 48 # be processed for API bundle generation. |
49 # | 49 # |
50 # configs [optional] | |
51 # Extra configs to apply to the compile step. | |
52 # | |
53 # deps [optional] | 50 # deps [optional] |
54 # If any deps are specified they will be inherited by the static library | 51 # If any deps are specified they will be inherited by the static library |
55 # target. | 52 # target. |
56 # | 53 # |
57 # generate_static_library [optional, defaults to false] | 54 # generate_static_library [optional, defaults to false] |
58 # Produces a static library instead of a source_set. | 55 # Produces a static library instead of a source_set. |
59 # | 56 # |
60 # The generated library target also inherits the visibility and output_name | 57 # The generated library target also inherits the visibility and output_name |
61 # of its invoker. | 58 # of its invoker. |
62 | 59 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 ] + rebase_path(invoker.sources, root_build_dir) + | 191 ] + rebase_path(invoker.sources, root_build_dir) + |
195 rebase_path(uncompiled_sources, root_build_dir) | 192 rebase_path(uncompiled_sources, root_build_dir) |
196 } | 193 } |
197 } | 194 } |
198 | 195 |
199 # Compute the contents of the library/source set. | 196 # Compute the contents of the library/source set. |
200 lib_sources = invoker.sources | 197 lib_sources = invoker.sources |
201 lib_deps = [] | 198 lib_deps = [] |
202 lib_public_deps = [] | 199 lib_public_deps = [] |
203 lib_extra_configs = [] | 200 lib_extra_configs = [] |
204 if (defined(invoker.configs)) { | |
205 lib_extra_configs += invoker.configs | |
206 } | |
207 | 201 |
208 if (schemas) { | 202 if (schemas) { |
209 lib_sources += get_target_outputs(":$schema_generator_name") | 203 lib_sources += get_target_outputs(":$schema_generator_name") |
210 lib_public_deps += [ ":$schema_generator_name" ] | 204 lib_public_deps += [ ":$schema_generator_name" ] |
211 lib_deps += [ "//tools/json_schema_compiler:generated_api_util" ] | 205 lib_deps += [ "//tools/json_schema_compiler:generated_api_util" ] |
212 lib_extra_configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 206 lib_extra_configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
213 } | 207 } |
214 | 208 |
215 if (bundle) { | 209 if (bundle) { |
216 lib_sources += get_target_outputs(":$bundle_generator_schema_name") | 210 lib_sources += get_target_outputs(":$bundle_generator_schema_name") |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 247 |
254 if (defined(invoker.visibility)) { | 248 if (defined(invoker.visibility)) { |
255 visibility = invoker.visibility | 249 visibility = invoker.visibility |
256 } | 250 } |
257 if (defined(invoker.output_name)) { | 251 if (defined(invoker.output_name)) { |
258 output_name = invoker.output_name | 252 output_name = invoker.output_name |
259 } | 253 } |
260 } | 254 } |
261 } | 255 } |
262 } | 256 } |
OLD | NEW |