Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2262)

Unified Diff: chrome/browser/ui/libgtk2ui/BUILD.gn

Issue 2449243002: Gtk3 ui: Add libgtk3ui as a separate build component (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/BUILD.gn
diff --git a/chrome/browser/ui/libgtk2ui/BUILD.gn b/chrome/browser/ui/libgtk2ui/BUILD.gn
index 8758227c0ac7d16102c6d4724ff0df8d2f8e2449..43d80589d3462c8ab9387106942099dccb0f724b 100644
--- a/chrome/browser/ui/libgtk2ui/BUILD.gn
+++ b/chrome/browser/ui/libgtk2ui/BUILD.gn
@@ -23,61 +23,101 @@ config("libgtk2ui_warnings") {
}
}
+sources_common = [
Dirk Pranke 2016/10/25 23:56:10 Nit: `common_sources` reads better.
Tom (Use chromium acct) 2016/10/26 18:20:01 Done.
+ "app_indicator_icon.cc",
+ "app_indicator_icon.h",
+ "app_indicator_icon_menu.cc",
+ "app_indicator_icon_menu.h",
+ "chrome_gtk_frame.cc",
+ "chrome_gtk_frame.h",
+ "chrome_gtk_menu_subclasses.cc",
+ "chrome_gtk_menu_subclasses.h",
+ "gtk2_event_loop.cc",
+ "gtk2_event_loop.h",
+ "gtk2_key_bindings_handler.cc",
+ "gtk2_key_bindings_handler.h",
+ "gtk2_status_icon.cc",
+ "gtk2_status_icon.h",
+ "gtk2_ui.cc",
+ "gtk2_ui.h",
+ "gtk2_util.cc",
+ "gtk2_util.h",
+ "libgtk2ui_export.h",
+ "menu_util.cc",
+ "menu_util.h",
+ "native_theme_gtk2.cc",
+ "native_theme_gtk2.h",
+ "print_dialog_gtk2.cc",
+ "print_dialog_gtk2.h",
+ "printing_gtk2_util.cc",
+ "printing_gtk2_util.h",
+ "select_file_dialog_impl.cc",
+ "select_file_dialog_impl.h",
+ "select_file_dialog_impl_gtk2.cc",
+ "select_file_dialog_impl_gtk2.h",
+ "select_file_dialog_impl_kde.cc",
+ "skia_utils_gtk2.cc",
+ "skia_utils_gtk2.h",
+ "unity_service.cc",
+ "unity_service.h",
+ "x11_input_method_context_impl_gtk2.cc",
+ "x11_input_method_context_impl_gtk2.h",
+]
+
+configs_common = []
Dirk Pranke 2016/10/25 23:56:10 common_configs. You could also use `shared_source
Tom (Use chromium acct) 2016/10/26 18:20:01 Done.
+
+if (use_gconf) {
+ sources_common += [
+ "gconf_listener.cc",
+ "gconf_listener.h",
+ ]
+ configs_common += [ "//build/config/linux/gconf" ]
+}
+
+if (use_cups) {
+ configs_common += [ "//printing:cups" ]
+}
+
+configs_common += [
+ ":libgtk2ui_warnings",
+ "//build/config/linux:x11",
+]
+
+deps_common = [
Dirk Pranke 2016/10/25 23:56:10 common_deps, etc.
Tom (Use chromium acct) 2016/10/26 18:20:01 Done.
+ "//base",
+ "//base:i18n",
+ "//base/third_party/dynamic_annotations",
+ "//chrome:extra_resources",
+ "//chrome:resources",
+ "//chrome:strings",
+ "//chrome/app:command_ids",
+ "//chrome/app/theme:theme_resources",
+ "//components/resources",
+ "//content/public/browser",
+ "//printing",
+ "//skia",
+ "//ui/aura",
+ "//ui/base",
+ "//ui/base/ime",
+ "//ui/display",
+ "//ui/events",
+ "//ui/events:events_base",
+ "//ui/events/platform/x11",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ "//ui/gfx/x",
+ "//ui/native_theme",
+ "//ui/resources",
+ "//ui/shell_dialogs",
+ "//ui/strings",
+ "//ui/views",
+]
+
component("libgtk2ui") {
- sources = [
- "app_indicator_icon.cc",
- "app_indicator_icon.h",
- "app_indicator_icon_menu.cc",
- "app_indicator_icon_menu.h",
- "chrome_gtk_frame.cc",
- "chrome_gtk_frame.h",
- "chrome_gtk_menu_subclasses.cc",
- "chrome_gtk_menu_subclasses.h",
- "gtk2_event_loop.cc",
- "gtk2_event_loop.h",
- "gtk2_key_bindings_handler.cc",
- "gtk2_key_bindings_handler.h",
- "gtk2_status_icon.cc",
- "gtk2_status_icon.h",
- "gtk2_ui.cc",
- "gtk2_ui.h",
- "gtk2_util.cc",
- "gtk2_util.h",
- "libgtk2ui_export.h",
- "menu_util.cc",
- "menu_util.h",
- "native_theme_gtk2.cc",
- "native_theme_gtk2.h",
- "print_dialog_gtk2.cc",
- "print_dialog_gtk2.h",
- "printing_gtk2_util.cc",
- "printing_gtk2_util.h",
- "select_file_dialog_impl.cc",
- "select_file_dialog_impl.h",
- "select_file_dialog_impl_gtk2.cc",
- "select_file_dialog_impl_gtk2.h",
- "select_file_dialog_impl_kde.cc",
- "skia_utils_gtk2.cc",
- "skia_utils_gtk2.h",
- "unity_service.cc",
- "unity_service.h",
- "x11_input_method_context_impl_gtk2.cc",
- "x11_input_method_context_impl_gtk2.h",
- ]
-
- if (use_gconf) {
- sources += [
- "gconf_listener.cc",
- "gconf_listener.h",
- ]
- configs += [ "//build/config/linux/gconf" ]
- }
+ sources = sources_common
+ configs += configs_common
defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
- if (use_cups) {
- configs += [ "//printing:cups" ]
- }
-
# GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz.
# To avoid missing indirectly referenced harfbuzz symbols from pango,
# some hack is required when bundled harfbuzz is used and component build is
@@ -85,50 +125,21 @@ component("libgtk2ui") {
# See crbug.com/462689 for details.
all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ]
- configs += [
- ":libgtk2ui_warnings",
- "//build/config/linux:x11",
+ deps = deps_common
+ deps += [
Dirk Pranke 2016/10/25 23:56:10 These two lines can be collapsed to `deps = common
Tom (Use chromium acct) 2016/10/26 18:20:01 Done.
+ "//build/config/linux/gtk2",
+ "//build/config/linux/gtk2:gtkprint2",
]
+}
- deps = [
- "//base",
- "//base:i18n",
- "//base/third_party/dynamic_annotations",
- "//chrome:extra_resources",
- "//chrome:resources",
- "//chrome:strings",
- "//chrome/app:command_ids",
- "//chrome/app/theme:theme_resources",
- "//components/resources",
- "//content/public/browser",
- "//printing",
- "//skia",
- "//ui/aura",
- "//ui/base",
- "//ui/base/ime",
- "//ui/display",
- "//ui/events",
- "//ui/events:events_base",
- "//ui/events/platform/x11",
- "//ui/gfx",
- "//ui/gfx/geometry",
- "//ui/gfx/x",
- "//ui/native_theme",
- "//ui/resources",
- "//ui/shell_dialogs",
- "//ui/strings",
- "//ui/views",
- ]
+component("libgtk3ui") {
+ sources = sources_common
+ configs += configs_common
+ defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
- if (use_gtk3) {
- deps += [
- "//build/config/linux/gtk3",
- "//build/config/linux/gtk3:gtkprint3",
- ]
- } else {
- deps += [
- "//build/config/linux/gtk2",
- "//build/config/linux/gtk2:gtkprint2",
- ]
- }
+ deps = deps_common
+ deps += [
+ "//build/config/linux/gtk3",
+ "//build/config/linux/gtk3:gtkprint3",
+ ]
}

Powered by Google App Engine
This is Rietveld 408576698