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

Unified Diff: build/config/ios/rules.gni

Issue 2564023002: Handle storyboards in GN. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/mac/base_rules.gni » ('j') | build/config/mac/base_rules.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/rules.gni
diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni
index d6413633829f6fa4be14ab248815c75d75f5c1b7..5b918eecb0cd72277019135bc5d0ac0e83f55773 100644
--- a/build/config/ios/rules.gni
+++ b/build/config/ios/rules.gni
@@ -749,7 +749,7 @@ set_defaults("ios_appex_bundle") {
# string, path of the xib or storyboard to compile.
#
# Forwards all variables to the bundle_data target.
-template("bundle_data_xib") {
+template("bundle_data_ib_file") {
sdefresne 2016/12/09 15:29:55 Don't remove the old template name, you'll break d
assert(defined(invoker.source), "source needs to be defined for $target_name")
_source_extension = get_path_info(invoker.source, "extension")
@@ -757,9 +757,15 @@ template("bundle_data_xib") {
"source must be a .xib or .storyboard for $target_name")
_target_name = target_name
- _compile_xib = target_name + "_compile_xib"
+ if (_source_extension == "xib") {
+ _compile_ib_file = target_name + "_compile_xib"
+ _compile_ib_file_template = "compile_xibs"
+ } else {
+ _compile_ib_file = target_name + "_compile_storyboard"
+ _compile_ib_file_template = "compile_storyboards"
+ }
- compile_xibs(_compile_xib) {
+ target(_compile_ib_file_template, _compile_ib_file) {
sources = [
invoker.source,
]
@@ -781,9 +787,9 @@ template("bundle_data_xib") {
if (!defined(public_deps)) {
public_deps = []
}
- public_deps += [ ":$_compile_xib" ]
+ public_deps += [ ":$_compile_ib_file" ]
- sources = get_target_outputs(":$_compile_xib")
+ sources = get_target_outputs(":$_compile_ib_file")
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
« no previous file with comments | « no previous file | build/config/mac/base_rules.gni » ('j') | build/config/mac/base_rules.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698