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("//build/module_args/mojo.gni") |
5 import("mojo.gni") | 6 import("mojo.gni") |
6 import("mojo_sdk.gni") | 7 import("mojo_sdk.gni") |
7 | 8 |
8 # Generate a binary mojo application.The parameters of this template are those | 9 # Generate a binary mojo application.The parameters of this template are those |
9 # of a shared library. | 10 # of a shared library. |
10 template("mojo_native_application") { | 11 template("mojo_native_application") { |
11 if (defined(invoker.output_name)) { | 12 if (defined(invoker.output_name)) { |
12 output = invoker.output_name + ".mojo" | 13 output = invoker.output_name + ".mojo" |
13 library_target_name = invoker.output_name + "_library" | 14 library_target_name = invoker.output_name + "_library" |
14 } else { | 15 } else { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 if (defined(invoker.ldflags)) { | 62 if (defined(invoker.ldflags)) { |
62 ldflags = invoker.ldflags | 63 ldflags = invoker.ldflags |
63 } | 64 } |
64 if (defined(invoker.lib_dirs)) { | 65 if (defined(invoker.lib_dirs)) { |
65 lib_dirs = invoker.lib_dirs | 66 lib_dirs = invoker.lib_dirs |
66 } | 67 } |
67 if (defined(invoker.libs)) { | 68 if (defined(invoker.libs)) { |
68 libs = invoker.libs | 69 libs = invoker.libs |
69 } | 70 } |
70 | 71 |
71 if (use_prebuilt_mojo_shell) { | 72 data_deps = [] |
72 copy_mojo_shell = | 73 if (defined(invoker.data_deps)) { |
73 rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) | 74 data_deps = invoker.data_deps |
74 } | 75 } |
75 | 76 |
76 # Copy the prebuilt mojo_shell if using it. | 77 # Copy any necessary prebuilt artifacts. |
77 if (defined(invoker.data_deps)) { | 78 if (use_prebuilt_mojo_shell) { |
78 data_deps = invoker.data_deps | 79 data_deps += |
79 if (use_prebuilt_mojo_shell) { | 80 [ rebase_path("mojo/public/tools:copy_mojo_shell", ".", mojo_root) ] |
80 data_deps += [ copy_mojo_shell ] | |
81 } | |
82 } else { | |
83 if (use_prebuilt_mojo_shell) { | |
84 data_deps = [ copy_mojo_shell ] | |
85 } | |
86 } | 81 } |
| 82 if (use_prebuilt_network_service) { |
| 83 data_deps += [ rebase_path("mojo/public/tools:copy_network_service", |
| 84 ".", |
| 85 mojo_root) ] |
| 86 } |
| 87 |
87 deps = rebase_path([ | 88 deps = rebase_path([ |
88 "mojo/public/c/system", | 89 "mojo/public/c/system", |
89 "mojo/public/platform/native:system", | 90 "mojo/public/platform/native:system", |
90 ], | 91 ], |
91 ".", | 92 ".", |
92 mojo_root) | 93 mojo_root) |
93 if (defined(invoker.deps)) { | 94 if (defined(invoker.deps)) { |
94 deps += invoker.deps | 95 deps += invoker.deps |
95 } | 96 } |
96 if (defined(invoker.forward_dependent_configs_from)) { | 97 if (defined(invoker.forward_dependent_configs_from)) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 rebase_input = rebase_path(input, root_build_dir) | 208 rebase_input = rebase_path(input, root_build_dir) |
208 rebase_output = rebase_path(output, root_build_dir) | 209 rebase_output = rebase_path(output, root_build_dir) |
209 args = [ | 210 args = [ |
210 "--input=$rebase_input", | 211 "--input=$rebase_input", |
211 "--output=$rebase_output", | 212 "--output=$rebase_output", |
212 "--line=#!mojo mojo:android_handler", | 213 "--line=#!mojo mojo:android_handler", |
213 ] | 214 ] |
214 } | 215 } |
215 } | 216 } |
216 } | 217 } |
OLD | NEW |