BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / libgtk2ui / BUILD.gn
blobc4295b9d03546f5751b17607e322d3318376e8ce
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/ui.gni")
10 component("libgtk2ui") {
11   sources = [
12     "app_indicator_icon.cc",
13     "app_indicator_icon.h",
14     "app_indicator_icon_menu.cc",
15     "app_indicator_icon_menu.h",
16     "chrome_gtk_frame.cc",
17     "chrome_gtk_frame.h",
18     "chrome_gtk_menu_subclasses.cc",
19     "chrome_gtk_menu_subclasses.h",
20     "g_object_destructor_filo.cc",
21     "g_object_destructor_filo.h",
22     "gtk2_border.cc",
23     "gtk2_border.h",
24     "gtk2_event_loop.cc",
25     "gtk2_event_loop.h",
26     "gtk2_key_bindings_handler.cc",
27     "gtk2_key_bindings_handler.h",
28     "gtk2_signal_registrar.cc",
29     "gtk2_signal_registrar.h",
30     "gtk2_status_icon.cc",
31     "gtk2_status_icon.h",
32     "gtk2_ui.cc",
33     "gtk2_ui.h",
34     "gtk2_util.cc",
35     "gtk2_util.h",
36     "libgtk2ui_export.h",
37     "menu_util.cc",
38     "menu_util.h",
39     "native_theme_gtk2.cc",
40     "native_theme_gtk2.h",
41     "owned_widget_gtk2.cc",
42     "owned_widget_gtk2.h",
43     "print_dialog_gtk2.cc",
44     "print_dialog_gtk2.h",
45     "printing_gtk2_util.cc",
46     "printing_gtk2_util.h",
47     "select_file_dialog_impl.cc",
48     "select_file_dialog_impl.h",
49     "select_file_dialog_impl_gtk2.cc",
50     "select_file_dialog_impl_kde.cc",
51     "skia_utils_gtk2.cc",
52     "skia_utils_gtk2.h",
53     "unity_service.cc",
54     "unity_service.h",
55     "x11_input_method_context_impl_gtk2.cc",
56     "x11_input_method_context_impl_gtk2.h",
57   ]
59   if (use_gconf) {
60     sources += [
61       "gconf_listener.cc",
62       "gconf_listener.h",
63     ]
64     configs += [ "//build/config/linux:gconf" ]
65   }
66   defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
68   if (use_cups) {
69     configs += [ "//printing:cups" ]
70   }
72   # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz.
73   # To avoid missing indirectly referenced harfbuzz symbols from pango,
74   # some hack is required when bundled harfbuzz is used and component build is
75   # disabled.
76   # See crbug.com/462689 for details.
77   all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ]
79   # gn orders flags on a target before flags from configs. The default config
80   # adds -Wall, and these flags have to be after -Wall -- so they need to come
81   # from a config and can't be on the target directly.
82   config("libgtk2ui_warnings") {
83     if (is_clang) {
84       cflags = [
85         # G_DEFINE_TYPE automatically generates a *get_instance_private inline
86         # function after glib 2.37. That's unused. Prevent to complain about it.
87         "-Wno-unused-function",
89         # G_STATIC_ASSERT uses a typedef as a static_assert.
90         "-Wno-unused-local-typedef",
91       ]
92     }
93   }
94   configs += [
95     ":libgtk2ui_warnings",
96     "//build/config/linux:x11",
97   ]
99   deps = [
100     "//base",
101     "//base/third_party/dynamic_annotations",
102     "//base:i18n",
103     "//chrome/app/theme:theme_resources",
104     "//chrome:extra_resources",
105     "//chrome:resources",
106     "//chrome:strings",
107     "//components/resources",
108     "//content/public/browser",
109     "//mojo/environment:chromium",
110     "//printing",
111     "//skia",
112     "//third_party/mojo/src/mojo/edk/system",
113     "//ui/aura",
114     "//ui/base",
115     "//ui/base/ime",
116     "//ui/events",
117     "//ui/events:events_base",
118     "//ui/gfx",
119     "//ui/gfx/x",
120     "//ui/native_theme",
121     "//ui/resources",
122     "//ui/shell_dialogs",
123     "//ui/strings",
124     "//ui/views",
125   ]
127   if (use_gtk3) {
128     deps += [
129       "//build/config/linux/gtk3",
130       "//build/config/linux/gtk3:gtkprint3",
131     ]
132   } else {
133     deps += [
134       "//build/config/linux/gtk2",
135       "//build/config/linux/gtk2:gtkprint2",
136     ]
137   }