diff --git a/engine/src/flutter/shell/platform/glfw/BUILD.gn b/engine/src/flutter/shell/platform/glfw/BUILD.gn index 2e16053228b..59735b59763 100644 --- a/engine/src/flutter/shell/platform/glfw/BUILD.gn +++ b/engine/src/flutter/shell/platform/glfw/BUILD.gn @@ -63,7 +63,7 @@ source_set("flutter_glfw") { "//flutter/third_party/rapidjson", ] - if (is_linux && !is_minimal_linux) { + if (is_linux) { libs = [ "GL" ] configs += [ "//flutter/shell/platform/linux/config:x11" ] diff --git a/engine/src/flutter/shell/platform/linux/BUILD.gn b/engine/src/flutter/shell/platform/linux/BUILD.gn index f4e609c0e64..919e807b926 100644 --- a/engine/src/flutter/shell/platform/linux/BUILD.gn +++ b/engine/src/flutter/shell/platform/linux/BUILD.gn @@ -96,9 +96,7 @@ source_set("flutter_linux_sources") { "key_mapping.h", ] - if (!is_minimal_linux) { - configs += [ "//flutter/shell/platform/linux/config:gtk" ] - } + configs += [ "//flutter/shell/platform/linux/config:gtk" ] sources = [ "fl_accessible_node.cc", @@ -184,12 +182,10 @@ source_set("flutter_linux_sources") { } source_set("flutter_linux") { - if (!is_minimal_linux) { - configs += [ - "//flutter/shell/platform/linux/config:gtk", - "//flutter/shell/platform/linux/config:epoxy", - ] - } + configs += [ + "//flutter/shell/platform/linux/config:gtk", + "//flutter/shell/platform/linux/config:epoxy", + ] defines = [ "FLUTTER_ENGINE_NO_PROTOTYPES" ] @@ -275,12 +271,10 @@ executable("flutter_linux_unittests") { public_configs = [ "//flutter:config" ] - if (!is_minimal_linux) { - configs += [ - "//flutter/shell/platform/linux/config:gtk", - "//flutter/shell/platform/linux/config:epoxy", - ] - } + configs += [ + "//flutter/shell/platform/linux/config:gtk", + "//flutter/shell/platform/linux/config:epoxy", + ] defines = [ "FLUTTER_ENGINE_NO_PROTOTYPES", diff --git a/engine/src/flutter/shell/platform/linux/config/BUILD.gn b/engine/src/flutter/shell/platform/linux/config/BUILD.gn index da0ac056bc5..e6f5abbea33 100644 --- a/engine/src/flutter/shell/platform/linux/config/BUILD.gn +++ b/engine/src/flutter/shell/platform/linux/config/BUILD.gn @@ -5,18 +5,32 @@ import("//build/config/linux/pkg_config.gni") import("//flutter/shell/platform/glfw/config.gni") -pkg_config("x11") { - packages = [ "x11" ] -} +_pkg_configs = [ + { + name = "x11" + package = "x11" + }, + { + name = "gtk" + package = "gtk+-3.0" + }, + { + name = "egl" + package = "egl" + }, + { + name = "epoxy" + package = "epoxy" + }, +] -pkg_config("gtk") { - packages = [ "gtk+-3.0" ] -} - -pkg_config("egl") { - packages = [ "egl" ] -} - -pkg_config("epoxy") { - packages = [ "epoxy" ] +foreach(pkg, _pkg_configs) { + if (!is_minimal_linux) { + pkg_config(pkg.name) { + packages = [ pkg.package ] + } + } else { + config(pkg.name) { + } + } } diff --git a/engine/src/flutter/testing/BUILD.gn b/engine/src/flutter/testing/BUILD.gn index 7f612289bb4..1a21ac33669 100644 --- a/engine/src/flutter/testing/BUILD.gn +++ b/engine/src/flutter/testing/BUILD.gn @@ -51,7 +51,7 @@ source_set("testing") { sources = [ "run_all_unittests.cc" ] - if (enable_unittests && is_linux && !is_minimal_linux) { + if (enable_unittests && is_linux) { # So that we can call gtk_init in main(). configs += [ "//flutter/shell/platform/linux/config:gtk" ] }