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

Side by Side Diff: mojo/mojo_application_package.gni

Issue 1189703004: Reland: Build Mojo apps in sub-dirs, like application packages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup, move getAssetsList to FileHelper; rename local to cached. Created 5 years, 6 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 | « mandoline/ui/omnibox/BUILD.gn ('k') | mojo/public/mojo_application.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//mojo/public/mojo_application.gni")
6
7 # Used for mojo applications that have resources. This creates a directory
8 # named output_name with the following contents:
9 # output_name.mojo : the shared library
10 # resources : resources
11 template("mojo_application_package") {
12 mojo_deps = []
13 if (defined(invoker.deps)) {
14 mojo_deps += invoker.deps
15 }
16
17 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_step_name = "${target_name}__copy_resources"
24 copy(copy_step_name) {
25 sources = invoker.resources
26 outputs = [
27 "$root_out_dir/$output_name/resources/{{source_file_part}}",
28 ]
29 if (defined(invoker.testonly)) {
30 testonly = invoker.testonly
31 }
32 deps = mojo_deps
33 }
34 mojo_deps += [ ":$copy_step_name" ]
35 }
36
37 mojo_native_application(target_name) {
38 output_name = invoker.target_name
39 if (defined(invoker.output_name)) {
40 output_name = invoker.output_name
41 }
42 output_name = output_name + "/" + output_name
43
44 deps = mojo_deps
45
46 if (defined(invoker.cflags)) {
47 cflags = invoker.cflags
48 }
49 if (defined(invoker.cflags_c)) {
50 cflags_c = invoker.cflags_c
51 }
52 if (defined(invoker.cflags_cc)) {
53 cflags_cc = invoker.cflags_cc
54 }
55 if (defined(invoker.cflags_objc)) {
56 cflags_objc = invoker.cflags_objc
57 }
58 if (defined(invoker.cflags_objcc)) {
59 cflags_objcc = invoker.cflags_objcc
60 }
61 if (defined(invoker.defines)) {
62 defines = invoker.defines
63 }
64 if (defined(invoker.include_dirs)) {
65 include_dirs = invoker.include_dirs
66 }
67 if (defined(invoker.ldflags)) {
68 ldflags = invoker.ldflags
69 }
70 if (defined(invoker.lib_dirs)) {
71 lib_dirs = invoker.lib_dirs
72 }
73 if (defined(invoker.libs)) {
74 libs = invoker.libs
75 }
76 if (defined(invoker.data_deps)) {
77 data_deps = invoker.data_deps
78 }
79 if (defined(invoker.forward_dependent_configs_from)) {
80 forward_dependent_configs_from = invoker.forward_dependent_configs_from
81 }
82 if (defined(invoker.public_deps)) {
83 public_deps = invoker.public_deps
84 }
85 if (defined(invoker.all_dependent_configs)) {
86 all_dependent_configs = invoker.all_dependent_configs
87 }
88 if (defined(invoker.public_configs)) {
89 public_configs = invoker.public_configs
90 }
91 if (defined(invoker.check_includes)) {
92 check_includes = invoker.check_includes
93 }
94 if (defined(invoker.configs)) {
95 configs = invoker.configs
96 }
97 if (defined(invoker.data)) {
98 data = invoker.data
99 }
100 if (defined(invoker.inputs)) {
101 inputs = invoker.inputs
102 }
103 if (defined(invoker.public)) {
104 public = invoker.public
105 }
106 if (defined(invoker.sources)) {
107 sources = invoker.sources
108 }
109 if (defined(invoker.testonly)) {
110 testonly = invoker.testonly
111 }
112 }
113 }
OLDNEW
« no previous file with comments | « mandoline/ui/omnibox/BUILD.gn ('k') | mojo/public/mojo_application.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698