| 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 import("../../mojo_sdk.gni") | 5 import("../../mojo_sdk.gni") |
| 6 | 6 |
| 7 # Generate C++/JavaScript/Java/Python/Dart/Go source files from mojom files. The | 7 # Generate C++/JavaScript/Java/Python/Dart/Go source files from mojom files. The |
| 8 # output files will go under the generated file directory tree with the same | 8 # output files will go under the generated file directory tree with the same |
| 9 # path as each input file. | 9 # path as each input file. |
| 10 # | 10 # |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 "-d", | 184 "-d", |
| 185 rebase_path("//", root_build_dir), | 185 rebase_path("//", root_build_dir), |
| 186 "-I", | 186 "-I", |
| 187 rebase_path("//", root_build_dir), | 187 rebase_path("//", root_build_dir), |
| 188 "-I", | 188 "-I", |
| 189 rebase_path(mojo_root, root_build_dir), | 189 rebase_path(mojo_root, root_build_dir), |
| 190 "-o", | 190 "-o", |
| 191 rebase_path(root_gen_dir), | 191 rebase_path(root_gen_dir), |
| 192 ] | 192 ] |
| 193 | 193 |
| 194 if (defined(invoker.dataonly) && invoker.dataonly) { |
| 195 args += [ "--cpp_dataonly" ] |
| 196 } |
| 197 |
| 194 if (defined(invoker.import_dirs)) { | 198 if (defined(invoker.import_dirs)) { |
| 195 foreach(import_dir, invoker.import_dirs) { | 199 foreach(import_dir, invoker.import_dirs) { |
| 196 args += [ | 200 args += [ |
| 197 "-I", | 201 "-I", |
| 198 rebase_path(import_dir, root_build_dir), | 202 rebase_path(import_dir, root_build_dir), |
| 199 ] | 203 ] |
| 200 } | 204 } |
| 201 } | 205 } |
| 202 } | 206 } |
| 203 } | 207 } |
| 204 | 208 |
| 205 source_set(target_name) { | 209 source_set(target_name) { |
| 206 if (defined(invoker.visibility)) { | 210 if (defined(invoker.visibility)) { |
| 207 visibility = invoker.visibility | 211 visibility = invoker.visibility |
| 208 } | 212 } |
| 209 if (defined(invoker.testonly)) { | 213 if (defined(invoker.testonly)) { |
| 210 testonly = invoker.testonly | 214 testonly = invoker.testonly |
| 211 } | 215 } |
| 212 if (defined(invoker.sources)) { | 216 if (defined(invoker.sources)) { |
| 213 data = process_file_template(invoker.sources, generator_js_outputs) | 217 data = process_file_template(invoker.sources, generator_js_outputs) |
| 214 } | 218 } |
| 215 | 219 |
| 216 public_configs = | 220 public_configs = |
| 217 rebase_path([ "mojo/public/build/config:mojo_sdk" ], ".", mojo_root) | 221 rebase_path([ "mojo/public/build/config:mojo_sdk" ], ".", mojo_root) |
| 218 | 222 |
| 219 public_deps = rebase_path([ "mojo/public/cpp/bindings" ], ".", mojo_root) | 223 if (defined(invoker.dataonly) && invoker.dataonly) { |
| 224 public_deps = rebase_path([ "mojo/public/cpp/bindings:serialization" ], |
| 225 ".", |
| 226 mojo_root) |
| 227 } else { |
| 228 public_deps = rebase_path([ "mojo/public/cpp/bindings" ], ".", mojo_root) |
| 229 } |
| 230 |
| 220 if (defined(invoker.sources)) { | 231 if (defined(invoker.sources)) { |
| 221 public_deps += [ ":${cpp_sources_target_name}" ] | 232 public_deps += [ ":${cpp_sources_target_name}" ] |
| 222 } | 233 } |
| 223 public_deps += rebased_mojo_sdk_public_deps | 234 public_deps += rebased_mojo_sdk_public_deps |
| 224 if (defined(invoker.public_deps)) { | 235 if (defined(invoker.public_deps)) { |
| 225 public_deps += invoker.public_deps | 236 public_deps += invoker.public_deps |
| 226 } | 237 } |
| 227 | 238 |
| 228 deps = [] | 239 deps = [] |
| 229 if (defined(invoker.sources)) { | 240 if (defined(invoker.sources)) { |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 # //mojo/something:something and we can append "_java" to get the java | 384 # //mojo/something:something and we can append "_java" to get the java |
| 374 # dependency name. | 385 # dependency name. |
| 375 full_name = get_label_info(d, "label_no_toolchain") | 386 full_name = get_label_info(d, "label_no_toolchain") |
| 376 deps += [ "${full_name}_java" ] | 387 deps += [ "${full_name}_java" ] |
| 377 } | 388 } |
| 378 | 389 |
| 379 srcjar_deps = [ ":$java_srcjar_target_name" ] | 390 srcjar_deps = [ ":$java_srcjar_target_name" ] |
| 380 } | 391 } |
| 381 } | 392 } |
| 382 } | 393 } |
| OLD | NEW |