• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 Google LLC.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("../../gn/ios.gni")
6
7if (is_ios) {
8  group("skottie_ios_app") {
9    deps = [
10      ":skottie_example",
11    ]
12  }
13  ios_app_bundle("skottie_example") {
14    sources = [
15      "SkiaContext.h",
16      "SkiaContext.mm",
17      "SkiaViewController.h",
18      "SkiaViewController.mm",
19      "SkottieViewController.h",
20      "SkottieViewController.mm",
21      "main.mm",
22    ]
23    if (skia_enable_gpu && skia_use_metal) {
24      sources += [
25        "SkMetalViewBridge.h",
26        "SkMetalViewBridge.mm",
27        "SkiaMetalContext.mm",
28      ]
29    } else if (skia_enable_gpu && skia_use_gl) {
30      sources += [ "SkiaGLContext.mm" ]
31    } else {
32      sources += [ "SkiaUIContext.mm" ]
33    }
34    data_sources = [
35      "../../resources/skottie/skottie-3d-rotation-order.json",
36      "../../resources/skottie/skottie-camera-parent-3.json",
37      "../../resources/skottie/skottie-gradient-ramp.json",
38      "../../resources/skottie/skottie-linear-wipe-effect.json",
39      "../../resources/skottie/skottie-text-animator-1.json",
40      "../../resources/skottie/skottie-text-animator-2.json",
41      "../../resources/skottie/skottie-text-animator-3.json",
42      "../../resources/skottie/skottie-text-animator-4.json",
43      "../../resources/skottie/skottie-text-animator-5.json",
44      "../../resources/skottie/skottie-text-animator-8.json",
45      "../../resources/skottie/skottie-transform-effect.json",
46      "../../resources/skottie/skottie_sample_2.json",
47    ]
48    deps = [
49      "../..:skia",
50      "../../modules/skottie",
51    ]
52    cflags_objcc = [
53      "-std=c++14",
54      "-w",
55    ]
56    libs = [
57      "CoreFoundation.framework",
58      "Foundation.framework",
59      "QuartzCore.framework",
60      "UIKit.framework",
61    ]
62    if (skia_enable_gpu && skia_use_metal) {
63      libs += [
64        "Metal.framework",
65        "MetalKit.framework",
66      ]
67    } else if (skia_enable_gpu && skia_use_gl) {
68      libs += [
69        "GLKit.framework",
70        "OpenGLES.framework",
71      ]
72    }
73    launchscreen = "../../platform_tools/ios/app/LaunchScreen.storyboard"
74  }
75}
76