1# Copyright 2019 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
5import("//build/config/ios/templates/ios_app_bundle.gni")
6import("//build/config/ios/templates/ios_framework_bundle.gni")
7import("//build/config/ios/templates/storyboards.gni")
8
9ios_app_bundle("hello") {
10  output_name = "Hello"
11  info_plist = "resources/Info.plist"
12
13  sources = [ "main.m" ]
14
15  deps = [ ":hello_framework+bundle" ]
16}
17
18ios_framework_bundle("hello_framework") {
19  output_name = "HelloMain"
20
21  sources = [
22    "AppDelegate.h",
23    "AppDelegate.m",
24    "SceneDelegate.h",
25    "SceneDelegate.m",
26    "ViewController.h",
27    "ViewController.m",
28    "hello_main.m",
29  ]
30
31  frameworks = [
32    "CoreGraphics.framework",
33    "Foundation.framework",
34    "UIKit.framework",
35  ]
36
37  deps = [
38    ":foo",
39    ":storyboards",
40    "//shared:hello_framework",
41    "//shared:hello_framework+bundle",
42  ]
43}
44
45storyboards("storyboards") {
46  sources = [
47    "resources/LaunchScreen.storyboard",
48    "resources/Main.storyboard",
49  ]
50}
51
52source_set("baz") {
53  module_name = "Baz"
54  sources = [ "Baz.swift" ]
55}
56
57source_set("bar") {
58  module_name = "Bar"
59  sources = [ "Bar.swift" ]
60  deps = [ ":baz" ]
61}
62
63group("bar_indirect") {
64  public_deps = [ ":bar" ]
65}
66
67source_set("foo") {
68  module_name = "Foo"
69  bridge_header = "Foo-Bridging-Header.h"
70  sources = [
71    "Foo.swift",
72    "FooWrapper.swift",
73  ]
74  deps = [ ":bar_indirect" ]
75}
76