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