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

Side by Side Diff: mojo/public/tools/bindings/mojom.gni

Issue 549453004: GN: Fix compile errors with os==chromeos mojo/public build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signed
Patch Set: Update description Created 6 years, 2 months 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 unified diff | Download patch
« no previous file with comments | « mojo/public/interfaces/bindings/tests/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Generate C++ and JavaScript source files from mojom files. The output files 5 # Generate C++ and JavaScript source files from mojom files. The output files
6 # will go under the generated file directory tree with the same path as each 6 # will go under the generated file directory tree with the same path as each
7 # input file. 7 # input file.
8 # 8 #
9 # Parameters: 9 # Parameters:
10 # 10 #
11 # sources (required) 11 # sources (required)
12 # List of source .mojom files to compile. 12 # List of source .mojom files to compile.
13 # 13 #
14 # deps (optional) 14 # deps (optional)
15 #
15 # public_deps (optional) 16 # public_deps (optional)
17 #
18 # testonly (optional)
19 #
16 # visibility (optional) 20 # visibility (optional)
17 template("mojom") { 21 template("mojom") {
18 assert(defined(invoker.sources), 22 assert(defined(invoker.sources),
19 "\"sources\" must be defined for the $target_name template.") 23 "\"sources\" must be defined for the $target_name template.")
20 24
21 generator_root = "//mojo/public/tools/bindings" 25 generator_root = "//mojo/public/tools/bindings"
22 generator_script = "$generator_root/mojom_bindings_generator.py" 26 generator_script = "$generator_root/mojom_bindings_generator.py"
23 generator_sources = [ 27 generator_sources = [
24 generator_script, 28 generator_script,
25 "$generator_root/generators/cpp_templates/enum_declaration.tmpl", 29 "$generator_root/generators/cpp_templates/enum_declaration.tmpl",
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 "-d", rebase_path("//", root_build_dir), 104 "-d", rebase_path("//", root_build_dir),
101 "-I", rebase_path("//", root_build_dir), 105 "-I", rebase_path("//", root_build_dir),
102 "-o", "{{source_gen_dir}}", 106 "-o", "{{source_gen_dir}}",
103 ] 107 ]
104 } 108 }
105 109
106 source_set(target_name) { 110 source_set(target_name) {
107 if (defined(invoker.visibility)) { 111 if (defined(invoker.visibility)) {
108 visibility = invoker.visibility 112 visibility = invoker.visibility
109 } 113 }
114 if (defined(invoker.testonly)) {
115 testonly = invoker.testonly
116 }
110 sources = process_file_template(invoker.sources, generator_cpp_outputs) 117 sources = process_file_template(invoker.sources, generator_cpp_outputs)
111 data = process_file_template(invoker.sources, generator_js_outputs) 118 data = process_file_template(invoker.sources, generator_js_outputs)
112 deps = [ 119 deps = [
113 ":$generator_target_name", 120 ":$generator_target_name",
114 "//mojo/public/cpp/bindings", 121 "//mojo/public/cpp/bindings",
115 ] 122 ]
116 if (defined(invoker.deps)) { 123 if (defined(invoker.deps)) {
117 deps += invoker.deps 124 deps += invoker.deps
118 } 125 }
119 if (defined(invoker.public_deps)) { 126 if (defined(invoker.public_deps)) {
120 public_deps = invoker.public_deps 127 public_deps = invoker.public_deps
121 } 128 }
122 } 129 }
123 } 130 }
OLDNEW
« no previous file with comments | « mojo/public/interfaces/bindings/tests/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698