chromium/ios/third_party/lottie/BUILD.gn

# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ios/ios_sdk.gni")
import("//build/config/ios/rules.gni")

_lottie_public_headers = [
  # $ cd src/ios/third_party/lottie
  # $ find src -path 'src/lottie-ios/Classes/PublicHeaders/*.h'  -a \! -path '*Test*'|\sed -e
  #   's:\(.*\):  "\1",:'|sort -u

  "src/lottie-ios/Classes/PublicHeaders/LOTAnimatedControl.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimatedSwitch.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationCache.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationTransitionController.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationView.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationView_Compat.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTBlockCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTCacheProvider.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTComposition.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTInterpolatorCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTKeypath.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTValueCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTValueDelegate.h",
  "src/lottie-ios/Classes/PublicHeaders/Lottie.h",
]

_lottie_include_dirs = [
  # List generated by the following commands:
  # $ cd src/ios/third_party/lottie
  # $ find src -path 'src/lottie-ios/Classes/**/*.h' -a \! -path '*Test*'|\
  #   sed -e 's:\(.*\)/[^/]*:  "\1",:'|sort -u

  "src/lottie-ios/Classes/AnimatableLayers",
  "src/lottie-ios/Classes/AnimatableProperties",
  "src/lottie-ios/Classes/Extensions",
  "src/lottie-ios/Classes/MacCompatibility",
  "src/lottie-ios/Classes/Models",
  "src/lottie-ios/Classes/Private",
  "src/lottie-ios/Classes/PublicHeaders",
  "src/lottie-ios/Classes/RenderSystem",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes",
  "src/lottie-ios/Classes/RenderSystem/ManipulatorNodes",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes",
]

_lottie_sources = [
  # List generated by the following commands:
  # $ cd src/ios/third_party/material_components_ios
  # $ find src -path 'src/lottie-ios/Classes/**/*.[hm]' -a \! -path '*Test*'|\
  #   sed -e 's:\(.*\):  "\1",:'|sort -u

  "src/lottie-ios/Classes/AnimatableLayers/LOTCompositionContainer.h",
  "src/lottie-ios/Classes/AnimatableLayers/LOTCompositionContainer.m",
  "src/lottie-ios/Classes/AnimatableLayers/LOTLayerContainer.h",
  "src/lottie-ios/Classes/AnimatableLayers/LOTLayerContainer.m",
  "src/lottie-ios/Classes/AnimatableLayers/LOTMaskContainer.h",
  "src/lottie-ios/Classes/AnimatableLayers/LOTMaskContainer.m",
  "src/lottie-ios/Classes/AnimatableProperties/LOTBezierData.h",
  "src/lottie-ios/Classes/AnimatableProperties/LOTBezierData.m",
  "src/lottie-ios/Classes/AnimatableProperties/LOTKeyframe.h",
  "src/lottie-ios/Classes/AnimatableProperties/LOTKeyframe.m",
  "src/lottie-ios/Classes/Extensions/CGGeometry+LOTAdditions.h",
  "src/lottie-ios/Classes/Extensions/CGGeometry+LOTAdditions.m",
  "src/lottie-ios/Classes/Extensions/LOTBezierPath.h",
  "src/lottie-ios/Classes/Extensions/LOTBezierPath.m",
  "src/lottie-ios/Classes/Extensions/LOTHelpers.h",
  "src/lottie-ios/Classes/Extensions/LOTRadialGradientLayer.h",
  "src/lottie-ios/Classes/Extensions/LOTRadialGradientLayer.m",
  "src/lottie-ios/Classes/Extensions/UIColor+Expanded.h",
  "src/lottie-ios/Classes/Extensions/UIColor+Expanded.m",
  "src/lottie-ios/Classes/MacCompatibility/CALayer+Compat.h",
  "src/lottie-ios/Classes/MacCompatibility/CALayer+Compat.m",
  "src/lottie-ios/Classes/MacCompatibility/LOTPlatformCompat.h",
  "src/lottie-ios/Classes/MacCompatibility/NSValue+Compat.h",
  "src/lottie-ios/Classes/MacCompatibility/NSValue+Compat.m",
  "src/lottie-ios/Classes/MacCompatibility/UIBezierPath.h",
  "src/lottie-ios/Classes/MacCompatibility/UIBezierPath.m",
  "src/lottie-ios/Classes/MacCompatibility/UIColor.h",
  "src/lottie-ios/Classes/MacCompatibility/UIColor.m",
  "src/lottie-ios/Classes/Models/LOTAsset.h",
  "src/lottie-ios/Classes/Models/LOTAsset.m",
  "src/lottie-ios/Classes/Models/LOTAssetGroup.h",
  "src/lottie-ios/Classes/Models/LOTAssetGroup.m",
  "src/lottie-ios/Classes/Models/LOTLayer.h",
  "src/lottie-ios/Classes/Models/LOTLayer.m",
  "src/lottie-ios/Classes/Models/LOTLayerGroup.h",
  "src/lottie-ios/Classes/Models/LOTLayerGroup.m",
  "src/lottie-ios/Classes/Models/LOTMask.h",
  "src/lottie-ios/Classes/Models/LOTMask.m",
  "src/lottie-ios/Classes/Models/LOTModels.h",
  "src/lottie-ios/Classes/Models/LOTShapeCircle.h",
  "src/lottie-ios/Classes/Models/LOTShapeCircle.m",
  "src/lottie-ios/Classes/Models/LOTShapeFill.h",
  "src/lottie-ios/Classes/Models/LOTShapeFill.m",
  "src/lottie-ios/Classes/Models/LOTShapeGradientFill.h",
  "src/lottie-ios/Classes/Models/LOTShapeGradientFill.m",
  "src/lottie-ios/Classes/Models/LOTShapeGroup.h",
  "src/lottie-ios/Classes/Models/LOTShapeGroup.m",
  "src/lottie-ios/Classes/Models/LOTShapePath.h",
  "src/lottie-ios/Classes/Models/LOTShapePath.m",
  "src/lottie-ios/Classes/Models/LOTShapeRectangle.h",
  "src/lottie-ios/Classes/Models/LOTShapeRectangle.m",
  "src/lottie-ios/Classes/Models/LOTShapeRepeater.h",
  "src/lottie-ios/Classes/Models/LOTShapeRepeater.m",
  "src/lottie-ios/Classes/Models/LOTShapeStar.h",
  "src/lottie-ios/Classes/Models/LOTShapeStar.m",
  "src/lottie-ios/Classes/Models/LOTShapeStroke.h",
  "src/lottie-ios/Classes/Models/LOTShapeStroke.m",
  "src/lottie-ios/Classes/Models/LOTShapeTransform.h",
  "src/lottie-ios/Classes/Models/LOTShapeTransform.m",
  "src/lottie-ios/Classes/Models/LOTShapeTrimPath.h",
  "src/lottie-ios/Classes/Models/LOTShapeTrimPath.m",
  "src/lottie-ios/Classes/Private/LOTAnimatedControl.m",
  "src/lottie-ios/Classes/Private/LOTAnimatedSwitch.m",
  "src/lottie-ios/Classes/Private/LOTAnimationCache.m",
  "src/lottie-ios/Classes/Private/LOTAnimationTransitionController.m",
  "src/lottie-ios/Classes/Private/LOTAnimationView.m",
  "src/lottie-ios/Classes/Private/LOTAnimationView_Internal.h",
  "src/lottie-ios/Classes/Private/LOTBlockCallback.m",
  "src/lottie-ios/Classes/Private/LOTCacheProvider.m",
  "src/lottie-ios/Classes/Private/LOTComposition.m",
  "src/lottie-ios/Classes/Private/LOTInterpolatorCallback.m",
  "src/lottie-ios/Classes/Private/LOTKeypath.m",
  "src/lottie-ios/Classes/Private/LOTValueCallback.m",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimatedControl.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimatedSwitch.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationCache.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationTransitionController.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationView.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTAnimationView_Compat.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTBlockCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTCacheProvider.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTComposition.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTInterpolatorCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTKeypath.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTValueCallback.h",
  "src/lottie-ios/Classes/PublicHeaders/LOTValueDelegate.h",
  "src/lottie-ios/Classes/PublicHeaders/Lottie.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTCircleAnimator.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTCircleAnimator.m",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.m",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolygonAnimator.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolygonAnimator.m",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolystarAnimator.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolystarAnimator.m",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTRoundedRectAnimator.h",
  "src/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTRoundedRectAnimator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPathInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPathInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTTransformInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTTransformInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTValueInterpolator.h",
  "src/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTValueInterpolator.m",
  "src/lottie-ios/Classes/RenderSystem/LOTAnimatorNode.h",
  "src/lottie-ios/Classes/RenderSystem/LOTAnimatorNode.m",
  "src/lottie-ios/Classes/RenderSystem/LOTRenderNode.h",
  "src/lottie-ios/Classes/RenderSystem/LOTRenderNode.m",
  "src/lottie-ios/Classes/RenderSystem/ManipulatorNodes/LOTTrimPathNode.h",
  "src/lottie-ios/Classes/RenderSystem/ManipulatorNodes/LOTTrimPathNode.m",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.h",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.m",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTGradientFillRender.h",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTGradientFillRender.m",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRenderGroup.h",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRenderGroup.m",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRepeaterRenderer.h",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRepeaterRenderer.m",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTStrokeRenderer.h",
  "src/lottie-ios/Classes/RenderSystem/RenderNodes/LOTStrokeRenderer.m",
]

config("config") {
  visibility = [ ":*" ]
  include_dirs = _lottie_include_dirs
}

ios_framework_bundle("lottie") {
  sources = _lottie_sources

  info_plist = "Info.plist"
  output_name = "Lottie"
  public_headers = _lottie_public_headers

  frameworks = [
    "CoreGraphics.framework",
    "Foundation.framework",
    "CoreFoundation.framework",
    "UIKit.framework",
    "QuartzCore.framework",
    "CoreVideo.framework",
    "GLKit.framework",
  ]

  configs -= [
    "//build/config/compiler:chromium_code",
    "//build/config/gcc:symbol_visibility_hidden",
  ]
  configs += [
    ":config",
    "//build/config/compiler:no_chromium_code",
    "//build/config/gcc:symbol_visibility_default",
  ]
}