1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 assert(is_linux, "This file should only be referenced on Linux")
7 import("//build/config/features.gni")
8 import("//build/config/linux/pkg_config.gni")
11 # Gtk requires gmodule, but it does not list it as a dependency in some
12 # misconfigured systems.
20 pkg_config("gtkprint") {
21 packages = [ "gtk+-unix-print-2.0" ]
24 component("libgtk2ui") {
26 "app_indicator_icon.cc",
27 "app_indicator_icon.h",
28 "app_indicator_icon_menu.cc",
29 "app_indicator_icon_menu.h",
30 "chrome_gtk_frame.cc",
32 "chrome_gtk_menu_subclasses.cc",
33 "chrome_gtk_menu_subclasses.h",
34 "g_object_destructor_filo.cc",
35 "g_object_destructor_filo.h",
40 "gtk2_key_bindings_handler.cc",
41 "gtk2_key_bindings_handler.h",
42 "gtk2_signal_registrar.cc",
43 "gtk2_signal_registrar.h",
44 "gtk2_status_icon.cc",
53 "native_theme_gtk2.cc",
54 "native_theme_gtk2.h",
55 "owned_widget_gtk2.cc",
56 "owned_widget_gtk2.h",
57 "print_dialog_gtk2.cc",
58 "print_dialog_gtk2.h",
59 "printing_gtk2_util.cc",
60 "printing_gtk2_util.h",
61 "select_file_dialog_impl.cc",
62 "select_file_dialog_impl.h",
63 "select_file_dialog_impl_gtk2.cc",
64 "select_file_dialog_impl_kde.cc",
69 "x11_input_method_context_impl_gtk2.cc",
70 "x11_input_method_context_impl_gtk2.h",
79 defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
84 "//build/config/linux:gconf",
88 # gn orders flags on a target before flags from configs. The default config
89 # adds -Wall, and these flags have to be after -Wall -- so they need to come
90 # from a config and can't be on the target directly.
91 config("libgtk2ui_warnings") {
94 # G_DEFINE_TYPE automatically generates a *get_instance_private inline
95 # function after glib 2.37. That's unused. Prevent to complain about it.
96 "-Wno-unused-function",
98 # G_STATIC_ASSERT uses a typedef as a static_assert.
99 "-Wno-unused-local-typedef",
104 ":libgtk2ui_warnings",
105 "//build/config/linux:x11",
110 "//base/third_party/dynamic_annotations",
112 "//chrome/app/theme:theme_resources",
113 "//chrome:extra_resources",
114 "//chrome:resources",
116 "//components/resources",
117 "//content/public/browser",
120 "//third_party/mojo/src/mojo/edk/system",
125 "//ui/events:events_base",
130 "//ui/shell_dialogs",