2019-09-09 21:03:38 +00:00
|
|
|
# Copyright 2019 Google LLC.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
import("../../gn/ios.gni")
|
|
|
|
|
2019-12-06 20:01:08 +00:00
|
|
|
if (is_ios) {
|
2019-12-11 15:32:59 +00:00
|
|
|
group("skottie_ios_app") {
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":skottie_example" ]
|
2019-12-11 15:32:59 +00:00
|
|
|
}
|
|
|
|
ios_app_bundle("skottie_example") {
|
2019-09-09 21:03:38 +00:00
|
|
|
sources = [
|
2019-12-18 21:26:19 +00:00
|
|
|
"SkiaContext.h",
|
|
|
|
"SkiaContext.mm",
|
|
|
|
"SkiaViewController.h",
|
|
|
|
"SkiaViewController.mm",
|
|
|
|
"SkottieViewController.h",
|
|
|
|
"SkottieViewController.mm",
|
2019-12-12 15:17:59 +00:00
|
|
|
"main.mm",
|
2019-09-09 21:03:38 +00:00
|
|
|
]
|
2019-12-18 21:26:19 +00:00
|
|
|
if (skia_enable_gpu && skia_use_metal) {
|
2019-12-06 20:01:08 +00:00
|
|
|
sources += [
|
|
|
|
"SkMetalViewBridge.h",
|
|
|
|
"SkMetalViewBridge.mm",
|
2019-12-18 21:26:19 +00:00
|
|
|
"SkiaMetalContext.mm",
|
2019-12-06 20:01:08 +00:00
|
|
|
]
|
2019-12-18 21:26:19 +00:00
|
|
|
} else if (skia_enable_gpu && skia_use_gl) {
|
|
|
|
sources += [ "SkiaGLContext.mm" ]
|
2019-12-06 20:01:08 +00:00
|
|
|
} else {
|
2019-12-18 21:26:19 +00:00
|
|
|
sources += [ "SkiaUIContext.mm" ]
|
2019-12-06 20:01:08 +00:00
|
|
|
}
|
2019-09-09 21:03:38 +00:00
|
|
|
data_sources = [
|
|
|
|
"../../resources/skottie/skottie-3d-rotation-order.json",
|
|
|
|
"../../resources/skottie/skottie-camera-parent-3.json",
|
|
|
|
"../../resources/skottie/skottie-gradient-ramp.json",
|
|
|
|
"../../resources/skottie/skottie-linear-wipe-effect.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-1.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-2.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-3.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-4.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-5.json",
|
|
|
|
"../../resources/skottie/skottie-text-animator-8.json",
|
|
|
|
"../../resources/skottie/skottie-transform-effect.json",
|
|
|
|
"../../resources/skottie/skottie_sample_2.json",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
"../..:skia",
|
|
|
|
"../../modules/skottie",
|
|
|
|
]
|
|
|
|
cflags_objcc = [
|
|
|
|
"-std=c++14",
|
|
|
|
"-w",
|
|
|
|
]
|
|
|
|
libs = [
|
2019-12-18 21:26:19 +00:00
|
|
|
"CoreFoundation.framework",
|
2019-12-06 20:01:08 +00:00
|
|
|
"Foundation.framework",
|
2019-12-18 21:26:19 +00:00
|
|
|
"QuartzCore.framework",
|
|
|
|
"UIKit.framework",
|
2019-09-09 21:03:38 +00:00
|
|
|
]
|
2019-12-18 21:26:19 +00:00
|
|
|
if (skia_enable_gpu && skia_use_metal) {
|
2019-12-06 20:01:08 +00:00
|
|
|
libs += [
|
|
|
|
"Metal.framework",
|
|
|
|
"MetalKit.framework",
|
|
|
|
]
|
2019-12-18 21:26:19 +00:00
|
|
|
} else if (skia_enable_gpu && skia_use_gl) {
|
|
|
|
libs += [
|
|
|
|
"GLKit.framework",
|
|
|
|
"OpenGLES.framework",
|
|
|
|
]
|
2019-12-06 20:01:08 +00:00
|
|
|
}
|
2019-09-09 21:03:38 +00:00
|
|
|
launchscreen = "../../platform_tools/ios/app/LaunchScreen.storyboard"
|
|
|
|
}
|
|
|
|
}
|