blob: 182636adc094fd9814066ee0a7520a770ca1e465 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(is_ios)
import("//build/config/ios/rules.gni")
import("//build/config/ios/ios_sdk.gni")
_flutter_framework_dir = "$root_out_dir/Flutter.framework"
shared_library("flutter_framework_dylib") {
visibility = [ ":*" ]
output_name = "Flutter"
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterAsyncMessageListener.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterJSONMessageListener.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
"framework/Source/accessibility_bridge.h",
"framework/Source/accessibility_bridge.mm",
"framework/Source/flutter_touch_mapper.h",
"framework/Source/flutter_touch_mapper.mm",
"framework/Source/FlutterAppDelegate.mm",
"framework/Source/FlutterDartProject_Internal.h",
"framework/Source/FlutterDartProject.mm",
"framework/Source/FlutterDartSource.h",
"framework/Source/FlutterDartSource.mm",
"framework/Source/FlutterJSONMessageListener.mm",
"framework/Source/FlutterPlatformPlugin.h",
"framework/Source/FlutterPlatformPlugin.mm",
"framework/Source/FlutterTextInputDelegate.h",
"framework/Source/FlutterTextInputPlugin.h",
"framework/Source/FlutterTextInputPlugin.mm",
"framework/Source/FlutterView.h",
"framework/Source/FlutterView.mm",
"framework/Source/FlutterViewController.mm",
"framework/Source/platform_message_router.h",
"framework/Source/platform_message_router.mm",
"framework/Source/vsync_waiter_ios.h",
"framework/Source/vsync_waiter_ios.mm",
"platform_view_ios.h",
"platform_view_ios.mm",
]
deps = [
"//base:base",
"//dart/runtime:libdart",
"//flutter/glue",
"//flutter/lib/ui",
"//flutter/shell/common",
"//flutter/shell/gpu",
"//flutter/shell/platform/darwin/common",
"//flutter/sky/engine/platform",
"//flutter/sky/engine/wtf",
"//lib/ftl",
"//third_party/skia",
]
defines = [
"FLUTTER_FRAMEWORK"
]
libs = [
"UIKit.framework",
"OpenGLES.framework",
"AVFoundation.framework",
"AudioToolbox.framework",
"QuartzCore.framework",
]
}
copy("framework_dylib") {
visibility = [ ":*" ]
sources = [ "$root_out_dir/libFlutter.dylib" ]
outputs = [ "$_flutter_framework_dir/Flutter" ]
deps = [
":flutter_framework_dylib",
]
}
action("framework_install_name") {
visibility = [ ":*" ]
stamp_file = "$root_out_dir/flutter_install_name_stamp"
script = "//flutter/sky/tools/change_install_name.py"
inputs = [ "$_flutter_framework_dir/Flutter" ]
outputs = [ stamp_file ]
args = [
"--dylib",
rebase_path("$_flutter_framework_dir/Flutter"),
"--install_name",
"@rpath/Flutter.framework/Flutter",
"--stamp",
rebase_path(stamp_file),
]
deps = [
":framework_dylib"
]
}
copy("framework_info_plist") {
visibility = [ ":*" ]
sources = [ "framework/Info.plist" ]
outputs = [ "$_flutter_framework_dir/Info.plist" ]
}
copy("framework_module_map") {
visibility = [ ":*" ]
sources = [ "framework/module.modulemap" ]
outputs = [ "$_flutter_framework_dir/Modules/module.modulemap" ]
}
copy("framework_headers") {
visibility = [ ":*" ]
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterAsyncMessageListener.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterJSONMessageListener.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
]
outputs = [ "$_flutter_framework_dir/Headers/{{source_file_part}}" ]
}
copy("framework_icu") {
visibility = [ ":*" ]
set_sources_assignment_filter([])
sources = [
"//third_party/icu/android/icudtl.dat",
]
set_sources_assignment_filter(sources_assignment_filter)
outputs = [ "$_flutter_framework_dir/{{source_file_part}}" ]
}
group("flutter_framework") {
public_deps = [
":framework_dylib",
":framework_headers",
":framework_icu",
":framework_info_plist",
":framework_install_name",
":framework_module_map",
]
}