diff options
author | sdefresne <sdefresne@chromium.org> | 2016-03-25 10:10:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 17:11:37 +0000 |
commit | f33a28da1492886771cefe133372077b762a9077 (patch) | |
tree | 0b1e7ef0e7cba373a06109174b0216391717ca99 /ios | |
parent | f7fd5b6ce047688f350a93c60658b5f4e10ad1a8 (diff) | |
download | chromium_src-f33a28da1492886771cefe133372077b762a9077.zip chromium_src-f33a28da1492886771cefe133372077b762a9077.tar.gz chromium_src-f33a28da1492886771cefe133372077b762a9077.tar.bz2 |
[iOS] Fix ios_web_shell to build with gn.
Add a new template bundle_data_xib that compile a xib or storyboard
file and declare a bundle_data target with the compilation output.
Add bundle_data targets required to get ios_web_shell to build and
run in the simulator.
BUG=297668,546283
Review URL: https://codereview.chromium.org/1808733003
Cr-Commit-Position: refs/heads/master@{#383295}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/web/shell/BUILD.gn | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/ios/web/shell/BUILD.gn b/ios/web/shell/BUILD.gn index a65c0af1..077c8e4 100644 --- a/ios/web/shell/BUILD.gn +++ b/ios/web/shell/BUILD.gn @@ -23,17 +23,24 @@ app("ios_web_shell") { "-Xlinker", "2", ] +} + +bundle_data_xib("main_view_bundle_data") { + visibility = [ ":shell" ] + source = "MainView.xib" +} - # TODO(crbug.com/546283): once gn supports bundle resources, add support for - # the following gyp code: - # - # 'mac_bundle_resources': [ - # 'shell/Default.png', - # 'shell/MainView.xib', - # 'shell/textfield_background@2x.png', - # 'shell/toolbar_back@2x.png', - # 'shell/toolbar_forward@2x.png', - # ], +bundle_data("shell_bundle_data") { + visibility = [ ":shell" ] + sources = [ + "Default.png", + "textfield_background@2x.png", + "toolbar_back@2x.png", + "toolbar_forward@2x.png", + ] + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] } source_set("shell") { @@ -57,6 +64,8 @@ source_set("shell") { ] deps = [ + ":main_view_bundle_data", + ":shell_bundle_data", "//base", "//ios/web", "//ios/web/public/app", |