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

Side by Side Diff: mojo/mojo_application_package.gni

Issue 1113223003: Revert of Adds resource_provider::ResourceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/BUILD.gn ('k') | mojo/services/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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("//third_party/mojo/src/mojo/public/mojo_application.gni") 5 import("//third_party/mojo/src/mojo/public/mojo_application.gni")
6 6
7 # Used for mojo applications that have resources. This creates a directory 7 # Used for mojo applications that have resources. This creates a directory
8 # named output_name with the following contents: 8 # named output_name with the following contents:
9 # output_name.mojo : the shared library 9 # output_name.mojo : the shared library
10 # resources : resources 10 # resources : resources
11 template("mojo_application_package") { 11 template("mojo_application_package") {
12 if (defined(invoker.output_name)) {
13 output_name = invoker.output_name
14 } else {
15 output_name = target_name
16 }
17
12 mojo_deps = [] 18 mojo_deps = []
13 if (defined(invoker.deps)) { 19 if (defined(invoker.deps)) {
14 mojo_deps += invoker.deps 20 mojo_deps += invoker.deps
15 } 21 }
16 22
17 if (defined(invoker.resources)) { 23 if (defined(invoker.resources)) {
18 output_name = target_name
19 if (defined(invoker.output_name)) {
20 output_name = invoker.output_name
21 }
22
23 copy("copy_mojo_application_resources") { 24 copy("copy_mojo_application_resources") {
24 sources = invoker.resources 25 sources = invoker.resources
25 outputs = [ 26 outputs = [
26 "$root_out_dir/$output_name/resources/{{source_file_part}}", 27 "$root_out_dir/$output_name/resources/{{source_file_part}}",
27 ] 28 ]
28 } 29 }
29 mojo_deps += [ ":copy_mojo_application_resources" ] 30 mojo_deps += [ ":copy_mojo_application_resources" ]
30 } 31 }
31 32
32 mojo_native_application(target_name) { 33 mojo_native_application(output_name) {
33 output_name = invoker.target_name 34 output_name = invoker.target_name + "/" + invoker.target_name
34 if (defined(invoker.output_name)) {
35 output_name = invoker.output_name
36 }
37 output_name = output_name + "/" + output_name
38 35
39 deps = mojo_deps 36 deps = mojo_deps
40 37
41 if (defined(invoker.cflags)) { 38 if (defined(invoker.cflags)) {
42 cflags = invoker.cflags 39 cflags = invoker.cflags
43 } 40 }
44 if (defined(invoker.cflags_c)) { 41 if (defined(invoker.cflags_c)) {
45 cflags_c = invoker.cflags_c 42 cflags_c = invoker.cflags_c
46 } 43 }
47 if (defined(invoker.cflags_cc)) { 44 if (defined(invoker.cflags_cc)) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 public = invoker.public 96 public = invoker.public
100 } 97 }
101 if (defined(invoker.sources)) { 98 if (defined(invoker.sources)) {
102 sources = invoker.sources 99 sources = invoker.sources
103 } 100 }
104 if (defined(invoker.testonly)) { 101 if (defined(invoker.testonly)) {
105 testonly = invoker.testonly 102 testonly = invoker.testonly
106 } 103 }
107 } 104 }
108 } 105 }
OLDNEW
« no previous file with comments | « mojo/BUILD.gn ('k') | mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698