Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: mojo/public/tools/bindings/mojom.gni

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/mojom.gni
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 69f4b768ff58a2b22b4c12a0d7133e49fc8a6c07..d7c83d6f3279eeeed5d910262f1c1b25f34c8336 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("../../mojo_sdk.gni")
+
# Generate C++ and JavaScript source files from mojom files. The output files
# will go under the generated file directory tree with the same path as each
# input file.
@@ -24,7 +26,8 @@ template("mojom") {
assert(defined(invoker.sources),
"\"sources\" must be defined for the $target_name template.")
- generator_root = "//mojo/public/tools/bindings"
+ generator_root =
+ rebase_path("mojo/public/tools/bindings", ".", mojo_root)
generator_script = "$generator_root/mojom_bindings_generator.py"
generator_sources = [
generator_script,
@@ -132,6 +135,7 @@ template("mojom") {
"--use_chromium_bundled_pylibs",
"-d", rebase_path("//", root_build_dir),
"-I", rebase_path("//", root_build_dir),
+ "-I", rebase_path(mojo_root, root_build_dir),
"-o", rebase_path(root_gen_dir),
]
}
@@ -145,16 +149,24 @@ template("mojom") {
}
sources = process_file_template(invoker.sources, generator_cpp_outputs)
data = process_file_template(invoker.sources, generator_js_outputs)
+
+ public_configs = rebase_path([
+ "mojo/public/build/config:mojo_sdk",
+ ], ".", mojo_root)
+
+ public_deps = rebase_path([
+ "mojo/public/cpp/bindings",
+ ], ".", mojo_root)
+ if (defined(invoker.public_deps)) {
+ public_deps += invoker.public_deps
+ }
+
deps = [
":$generator_target_name",
- "//mojo/public/cpp/bindings",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
- if (defined(invoker.public_deps)) {
- public_deps = invoker.public_deps
- }
}
all_deps = []
@@ -184,10 +196,10 @@ template("mojom") {
java_target_name = target_name + "_java"
android_library(java_target_name) {
- deps = [
- "//mojo/public/java:bindings",
- "//mojo/public/java:system",
- ]
+ deps = rebase_path([
+ "mojo/public/java:bindings",
+ "mojo/public/java:system",
+ ], ".", mojo_root)
foreach(d, all_deps) {
# Resolve the name, so that a target //mojo/something becomes

Powered by Google App Engine
This is Rietveld 408576698