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 = [ ":skottie_example" ] 10 } 11 ios_app_bundle("skottie_example") { 12 sources = [ 13 "SkiaContext.h", 14 "SkiaContext.mm", 15 "SkiaViewController.h", 16 "SkiaViewController.mm", 17 "SkottieViewController.h", 18 "SkottieViewController.mm", 19 "main.mm", 20 ] 21 if (skia_enable_gpu && skia_use_metal) { 22 sources += [ 23 "SkMetalViewBridge.h", 24 "SkMetalViewBridge.mm", 25 "SkiaMetalContext.mm", 26 ] 27 } else if (skia_enable_gpu && skia_use_gl) { 28 sources += [ "SkiaGLContext.mm" ] 29 } else { 30 sources += [ "SkiaUIContext.mm" ] 31 } 32 data_sources = [ 33 "../../resources/skottie/skottie-3d-rotation-order.json", 34 "../../resources/skottie/skottie-camera-parent-3.json", 35 "../../resources/skottie/skottie-gradient-ramp.json", 36 "../../resources/skottie/skottie-linear-wipe-effect.json", 37 "../../resources/skottie/skottie-text-animator-1.json", 38 "../../resources/skottie/skottie-text-animator-2.json", 39 "../../resources/skottie/skottie-text-animator-3.json", 40 "../../resources/skottie/skottie-text-animator-4.json", 41 "../../resources/skottie/skottie-text-animator-5.json", 42 "../../resources/skottie/skottie-text-animator-8.json", 43 "../../resources/skottie/skottie-transform-effect.json", 44 "../../resources/skottie/skottie_sample_2.json", 45 ] 46 deps = [ 47 "../..:skia", 48 "../../modules/skottie", 49 ] 50 cflags_objcc = [ 51 "-std=c++14", 52 "-w", 53 ] 54 frameworks = [ 55 "CoreFoundation.framework", 56 "Foundation.framework", 57 "QuartzCore.framework", 58 "UIKit.framework", 59 ] 60 if (skia_enable_gpu && skia_use_metal) { 61 frameworks += [ 62 "Metal.framework", 63 "MetalKit.framework", 64 ] 65 } else if (skia_enable_gpu && skia_use_gl) { 66 frameworks += [ 67 "GLKit.framework", 68 "OpenGLES.framework", 69 ] 70 } 71 launchscreen = "../../platform_tools/ios/app/LaunchScreen.storyboard" 72 } 73} 74