mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
91 lines
2.1 KiB
Plaintext
91 lines
2.1 KiB
Plaintext
# Copyright 2013 The Flutter 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_linux)
|
|
|
|
import("//flutter/shell/platform/glfw/config.gni")
|
|
|
|
group("linux") {
|
|
deps = [
|
|
":flutter_linux_gtk",
|
|
":publish_headers_linux",
|
|
]
|
|
if (build_glfw_shell) {
|
|
deps += [
|
|
":flutter_linux_glfw",
|
|
"//flutter/shell/platform/glfw:publish_headers_glfw",
|
|
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
|
|
]
|
|
}
|
|
}
|
|
|
|
# Temporary workaround for the issue describe in
|
|
# https://github.com/flutter/flutter/issues/14509 and
|
|
# https://github.com/flutter/flutter/issues/14438
|
|
# Remove once the build infrastructure moves to Ubuntu 18.04 or newer, where
|
|
# the underlying issue is fixed.
|
|
config("disable_fatal_link_warnings") {
|
|
visibility = [ ":*" ]
|
|
ldflags = [ "-Wl,--no-fatal-warnings" ]
|
|
}
|
|
|
|
if (build_glfw_shell) {
|
|
shared_library("flutter_linux_glfw") {
|
|
deps = [
|
|
"//flutter/shell/platform/glfw:flutter_glfw",
|
|
]
|
|
|
|
configs += [ ":disable_fatal_link_warnings" ]
|
|
|
|
public_configs = [ "//flutter:config" ]
|
|
}
|
|
}
|
|
|
|
_public_headers = [
|
|
"public/flutter_linux/fl_dart_project.h",
|
|
"public/flutter_linux/fl_view.h",
|
|
"public/flutter_linux/flutter_linux.h",
|
|
]
|
|
|
|
config("relative_flutter_linux_headers") {
|
|
include_dirs = [ "public" ]
|
|
}
|
|
|
|
source_set("flutter_linux") {
|
|
public = _public_headers
|
|
|
|
sources = [
|
|
"fl_dart_project.cc",
|
|
"fl_view.cc",
|
|
]
|
|
|
|
configs += [
|
|
"//flutter/shell/platform/linux/config:gtk",
|
|
"//flutter/shell/platform/linux/config:egl",
|
|
"//third_party/khronos:khronos_headers",
|
|
]
|
|
|
|
# Set flag to stop headers being directly included (library users should not do this)
|
|
defines = [ "FLUTTER_LINUX_COMPILATION" ]
|
|
|
|
deps = [
|
|
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
|
|
]
|
|
}
|
|
|
|
shared_library("flutter_linux_gtk") {
|
|
deps = [
|
|
":flutter_linux",
|
|
]
|
|
|
|
public_configs = [ "//flutter:config" ]
|
|
}
|
|
|
|
copy("publish_headers_linux") {
|
|
sources = _public_headers
|
|
outputs = [
|
|
"$root_out_dir/flutter_linux/{{source_file_part}}",
|
|
]
|
|
}
|