Revert of Split ui/base/ime into a new component (patchset #4 id:60001 of https:...
[chromium-blink-merge.git] / chrome / browser / ui / libgtk2ui / BUILD.gn
blob7614064e91cc52a258a18fbf0f9c4c65cfc7bc96
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")
10 pkg_config("gtk") {
11   # Gtk requires gmodule, but it does not list it as a dependency in some
12   # misconfigured systems.
13   packages = [
14     "gmodule-2.0",
15     "gtk+-2.0",
16     "gthread-2.0",
17   ]
20 pkg_config("gtkprint") {
21   packages = [ "gtk+-unix-print-2.0" ]
24 component("libgtk2ui") {
25   sources = [
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",
31     "chrome_gtk_frame.h",
32     "chrome_gtk_menu_subclasses.cc",
33     "chrome_gtk_menu_subclasses.h",
34     "g_object_destructor_filo.cc",
35     "g_object_destructor_filo.h",
36     "gtk2_border.cc",
37     "gtk2_border.h",
38     "gtk2_event_loop.cc",
39     "gtk2_event_loop.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",
45     "gtk2_status_icon.h",
46     "gtk2_ui.cc",
47     "gtk2_ui.h",
48     "gtk2_util.cc",
49     "gtk2_util.h",
50     "libgtk2ui_export.h",
51     "menu_util.cc",
52     "menu_util.h",
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",
65     "skia_utils_gtk2.cc",
66     "skia_utils_gtk2.h",
67     "unity_service.cc",
68     "unity_service.h",
69     "x11_input_method_context_impl_gtk2.cc",
70     "x11_input_method_context_impl_gtk2.h",
71   ]
73   if (use_gconf) {
74     sources += [
75       "gconf_listener.cc",
76       "gconf_listener.h",
77     ]
78   }
79   defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
81   configs += [
82     ":gtk",
83     ":gtkprint",
84     "//build/config/linux:gconf",
85     "//printing:cups",
86   ]
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") {
92     if (is_clang) {
93       cflags = [
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",
100       ]
101     }
102   }
103   configs += [
104     ":libgtk2ui_warnings",
105     "//build/config/linux:x11",
106   ]
108   deps = [
109     "//base",
110     "//base/third_party/dynamic_annotations",
111     "//base:i18n",
112     "//chrome/app/theme:theme_resources",
113     "//chrome:extra_resources",
114     "//chrome:resources",
115     "//chrome:strings",
116     "//components/resources",
117     "//content/public/browser",
118     "//printing",
119     "//skia",
120     "//third_party/mojo/src/mojo/edk/system",
121     "//ui/aura",
122     "//ui/base",
123     "//ui/events",
124     "//ui/events:events_base",
125     "//ui/gfx",
126     "//ui/gfx/x",
127     "//ui/native_theme",
128     "//ui/resources",
129     "//ui/shell_dialogs",
130     "//ui/strings",
131     "//ui/views",
132   ]