OLD | NEW |
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("//build/config/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
6 | 6 |
7 # TODO(crbug.com/297668): refactor this template to extract common behaviour | 7 # TODO(crbug.com/297668): refactor this template to extract common behaviour |
8 # between OS X and iOS bundle generation, then create a generic "app" template | 8 # between OS X and iOS bundle generation, then create a generic "app" template |
9 # that forward to "executable" on all platform except iOS/OS X. | 9 # that forward to "executable" on all platform except iOS/OS X. |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 "info_plist", | 107 "info_plist", |
108 "output_name", | 108 "output_name", |
109 "visibility", | 109 "visibility", |
110 ]) | 110 ]) |
111 | 111 |
112 output_name = rebase_path("$target_gen_dir/$_output_name", root_build_dir) | 112 output_name = rebase_path("$target_gen_dir/$_output_name", root_build_dir) |
113 if (!defined(libs)) { | 113 if (!defined(libs)) { |
114 libs = [] | 114 libs = [] |
115 } | 115 } |
116 libs += [ "UIKit.framework" ] | 116 libs += [ "UIKit.framework" ] |
| 117 |
| 118 # TODO(crbug.com/599203) - iossim should probably be a data dependency |
| 119 # of the create_bundle(target_name) target instead but at the moment |
| 120 # create_bundle() is ignoring data_deps. |
| 121 if (use_ios_simulator) { |
| 122 if (!defined(data_deps)) { |
| 123 data_deps = [] |
| 124 } |
| 125 data_deps += [ "//testing/iossim(${host_toolchain})" ] |
| 126 } |
117 } | 127 } |
118 | 128 |
119 bundle_data(_bundle_data_executable) { | 129 bundle_data(_bundle_data_executable) { |
120 forward_variables_from(invoker, [ "testonly" ]) | 130 forward_variables_from(invoker, [ "testonly" ]) |
121 visibility = [ ":$_target_name" ] | 131 visibility = [ ":$_target_name" ] |
122 sources = [ | 132 sources = [ |
123 "$target_gen_dir/$_output_name", | 133 "$target_gen_dir/$_output_name", |
124 ] | 134 ] |
125 outputs = [ | 135 outputs = [ |
126 "{{bundle_executable_dir}}/$_output_name", | 136 "{{bundle_executable_dir}}/$_output_name", |
(...skipping 14 matching lines...) Expand all Loading... |
141 ]) | 151 ]) |
142 | 152 |
143 if (!defined(deps)) { | 153 if (!defined(deps)) { |
144 deps = [] | 154 deps = [] |
145 } | 155 } |
146 deps += [ | 156 deps += [ |
147 ":$_bundle_data_executable", | 157 ":$_bundle_data_executable", |
148 ":$_bundle_data_info_plist", | 158 ":$_bundle_data_info_plist", |
149 ] | 159 ] |
150 | 160 |
151 if (use_ios_simulator) { | |
152 if (!defined(data_deps)) { | |
153 data_deps = [] | |
154 } | |
155 data_deps += [ "//testing/iossim(${host_toolchain})" ] | |
156 } | |
157 | |
158 bundle_root_dir = "$root_out_dir/$_output_name.app" | 161 bundle_root_dir = "$root_out_dir/$_output_name.app" |
159 bundle_resources_dir = bundle_root_dir | 162 bundle_resources_dir = bundle_root_dir |
160 bundle_executable_dir = bundle_root_dir | 163 bundle_executable_dir = bundle_root_dir |
161 bundle_plugins_dir = "$bundle_root_dir/Plugins" | 164 bundle_plugins_dir = "$bundle_root_dir/Plugins" |
162 } | 165 } |
163 | 166 |
164 # TODO(crbug.com/297668): | 167 # TODO(crbug.com/297668): |
165 # - add support for codesigning, | 168 # - add support for codesigning, |
166 # - find a way to make "ninja -C out/Default base_unittests.app" work as | 169 # - find a way to make "ninja -C out/Default base_unittests.app" work as |
167 # an alias to "ninja -C out/Default base_unittests" (for convenience | 170 # an alias to "ninja -C out/Default base_unittests" (for convenience |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 223 |
221 sources = [ | 224 sources = [ |
222 "$target_gen_dir/$_nib_filename/objects.nib", | 225 "$target_gen_dir/$_nib_filename/objects.nib", |
223 "$target_gen_dir/$_nib_filename/runtime.nib", | 226 "$target_gen_dir/$_nib_filename/runtime.nib", |
224 ] | 227 ] |
225 outputs = [ | 228 outputs = [ |
226 "{{bundle_resources_dir}}/$_nib_filename/{{source_file_part}}", | 229 "{{bundle_resources_dir}}/$_nib_filename/{{source_file_part}}", |
227 ] | 230 ] |
228 } | 231 } |
229 } | 232 } |
OLD | NEW |