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

Side by Side Diff: mojo/public/mojo_application.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 unified diff | Download patch
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 import("//mojo/public/mojo.gni") 5 import("mojo.gni")
6 import("mojo_sdk.gni")
6 7
7 # Generate a binary mojo application.The parameters of this template are those 8 # Generate a binary mojo application.The parameters of this template are those
8 # of a shared library. 9 # of a shared library.
9 template("mojo_native_application") { 10 template("mojo_native_application") {
10 if (defined(invoker.output_name)) { 11 if (defined(invoker.output_name)) {
11 output = invoker.output_name + ".mojo" 12 output = invoker.output_name + ".mojo"
12 library_target_name = invoker.output_name + "_library" 13 library_target_name = invoker.output_name + "_library"
13 } else { 14 } else {
14 output = target_name + ".mojo" 15 output = target_name + ".mojo"
15 library_target_name = target_name + "_library" 16 library_target_name = target_name + "_library"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 52 }
52 if (defined(invoker.ldflags)) { 53 if (defined(invoker.ldflags)) {
53 ldflags = invoker.ldflags 54 ldflags = invoker.ldflags
54 } 55 }
55 if (defined(invoker.lib_dirs)) { 56 if (defined(invoker.lib_dirs)) {
56 lib_dirs = invoker.lib_dirs 57 lib_dirs = invoker.lib_dirs
57 } 58 }
58 if (defined(invoker.libs)) { 59 if (defined(invoker.libs)) {
59 libs = invoker.libs 60 libs = invoker.libs
60 } 61 }
62
63 if (use_prebuilt_mojo_shell) {
64 copy_mojo_shell =
65 rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root)
66 }
67
61 # Copy the prebuilt mojo_shell if using it. 68 # Copy the prebuilt mojo_shell if using it.
62 if (defined(invoker.datadeps)) { 69 if (defined(invoker.datadeps)) {
63 datadeps = invoker.datadeps 70 datadeps = invoker.datadeps
64 if (use_prebuilt_mojo_shell) { 71 if (use_prebuilt_mojo_shell) {
65 datadeps += [ "//mojo/public/tools:copy_mojo_shell" ] 72 datadeps += [ copy_mojo_shell ]
66 } 73 }
67 } else { 74 } else {
68 if (use_prebuilt_mojo_shell) { 75 if (use_prebuilt_mojo_shell) {
69 datadeps = [ "//mojo/public/tools:copy_mojo_shell" ] 76 datadeps = [ copy_mojo_shell ]
70 } 77 }
71 } 78 }
79 deps = rebase_path([
80 "mojo/public/c/system:for_shared_library",
81 ], ".", mojo_root)
72 if (defined(invoker.deps)) { 82 if (defined(invoker.deps)) {
73 deps = invoker.deps 83 deps += invoker.deps
74 } 84 }
75 if (defined(invoker.forward_dependent_configs_from)) { 85 if (defined(invoker.forward_dependent_configs_from)) {
76 forward_dependent_configs_from = invoker.forward_dependent_configs_from 86 forward_dependent_configs_from = invoker.forward_dependent_configs_from
77 } 87 }
78 if (defined(invoker.public_deps)) { 88 if (defined(invoker.public_deps)) {
79 public_deps = invoker.public_deps 89 public_deps = invoker.public_deps
80 } 90 }
81 if (defined(invoker.all_dependent_configs)) { 91 if (defined(invoker.all_dependent_configs)) {
82 all_dependent_configs = invoker.all_dependent_configs 92 all_dependent_configs = invoker.all_dependent_configs
83 } 93 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 ] 169 ]
160 } 170 }
161 171
162 if (defined(invoker.output_name)) { 172 if (defined(invoker.output_name)) {
163 mojo_output = "$target_out_dir/" + invoker.output_name + ".mojo" 173 mojo_output = "$target_out_dir/" + invoker.output_name + ".mojo"
164 } else { 174 } else {
165 mojo_output = "$target_out_dir/" + target_name + ".mojo" 175 mojo_output = "$target_out_dir/" + target_name + ".mojo"
166 } 176 }
167 177
168 action(target_name) { 178 action(target_name) {
169 script = "//mojo/public/tools/prepend.py" 179 script = rebase_path("mojo/public/tools/prepend.py", ".", mojo_root)
170 180
171 input = zip_action_output 181 input = zip_action_output
172 inputs = [ input ] 182 inputs = [ input ]
173 183
174 output = mojo_output 184 output = mojo_output
175 outputs = [ output ] 185 outputs = [ output ]
176 186
177 rebase_input = rebase_path(input, root_build_dir) 187 rebase_input = rebase_path(input, root_build_dir)
178 rebase_output = rebase_path(output, root_build_dir) 188 rebase_output = rebase_path(output, root_build_dir)
179 args = [ 189 args = [
180 "--input=$rebase_input", 190 "--input=$rebase_input",
181 "--output=$rebase_output", 191 "--output=$rebase_output",
182 "--line=#!mojo:android_handler", 192 "--line=#!mojo:android_handler",
183 ] 193 ]
184 } 194 }
185 } 195 }
186 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698