OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 assert(is_linux, "This file should only be referenced on Linux") | 5 assert(is_linux, "This file should only be referenced on Linux") |
6 | 6 |
7 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
8 import("//build/config/linux/pkg_config.gni") | |
9 | |
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 ] | |
18 } | |
19 | |
20 pkg_config("gtkprint") { | |
21 packages = [ "gtk+-unix-print-2.0" ] | |
22 } | |
23 | 8 |
24 component("libgtk2ui") { | 9 component("libgtk2ui") { |
25 sources = [ | 10 sources = [ |
26 "app_indicator_icon.cc", | 11 "app_indicator_icon.cc", |
27 "app_indicator_icon.h", | 12 "app_indicator_icon.h", |
28 "app_indicator_icon_menu.cc", | 13 "app_indicator_icon_menu.cc", |
29 "app_indicator_icon_menu.h", | 14 "app_indicator_icon_menu.h", |
30 "chrome_gtk_frame.cc", | 15 "chrome_gtk_frame.cc", |
31 "chrome_gtk_frame.h", | 16 "chrome_gtk_frame.h", |
32 "chrome_gtk_menu_subclasses.cc", | 17 "chrome_gtk_menu_subclasses.cc", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 57 |
73 if (use_gconf) { | 58 if (use_gconf) { |
74 sources += [ | 59 sources += [ |
75 "gconf_listener.cc", | 60 "gconf_listener.cc", |
76 "gconf_listener.h", | 61 "gconf_listener.h", |
77 ] | 62 ] |
78 } | 63 } |
79 defines = [ "LIBGTK2UI_IMPLEMENTATION" ] | 64 defines = [ "LIBGTK2UI_IMPLEMENTATION" ] |
80 | 65 |
81 configs += [ | 66 configs += [ |
82 ":gtk", | |
83 ":gtkprint", | |
84 "//build/config/linux:gconf", | 67 "//build/config/linux:gconf", |
85 "//printing:cups", | 68 "//printing:cups", |
86 ] | 69 ] |
87 | 70 |
88 # gn orders flags on a target before flags from configs. The default config | 71 # 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 | 72 # 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. | 73 # from a config and can't be on the target directly. |
91 config("libgtk2ui_warnings") { | 74 config("libgtk2ui_warnings") { |
92 if (is_clang) { | 75 if (is_clang) { |
93 cflags = [ | 76 cflags = [ |
94 # G_DEFINE_TYPE automatically generates a *get_instance_private inline | 77 # G_DEFINE_TYPE automatically generates a *get_instance_private inline |
95 # function after glib 2.37. That's unused. Prevent to complain about it. | 78 # function after glib 2.37. That's unused. Prevent to complain about it. |
96 "-Wno-unused-function", | 79 "-Wno-unused-function", |
97 | 80 |
98 # G_STATIC_ASSERT uses a typedef as a static_assert. | 81 # G_STATIC_ASSERT uses a typedef as a static_assert. |
99 "-Wno-unused-local-typedef", | 82 "-Wno-unused-local-typedef", |
100 ] | 83 ] |
101 } | 84 } |
102 } | 85 } |
103 configs += [ | 86 configs += [ |
104 ":libgtk2ui_warnings", | 87 ":libgtk2ui_warnings", |
105 "//build/config/linux:x11", | 88 "//build/config/linux:x11", |
106 ] | 89 ] |
107 | 90 |
108 deps = [ | 91 deps = [ |
109 "//base", | 92 "//base", |
110 "//base/third_party/dynamic_annotations", | 93 "//base/third_party/dynamic_annotations", |
111 "//base:i18n", | 94 "//base:i18n", |
| 95 "//build/config/linux/gtk", |
| 96 "//build/config/linux/gtk:gtkprint", |
112 "//chrome/app/theme:theme_resources", | 97 "//chrome/app/theme:theme_resources", |
113 "//chrome:extra_resources", | 98 "//chrome:extra_resources", |
114 "//chrome:resources", | 99 "//chrome:resources", |
115 "//chrome:strings", | 100 "//chrome:strings", |
116 "//components/resources", | 101 "//components/resources", |
117 "//content/public/browser", | 102 "//content/public/browser", |
118 "//printing", | 103 "//printing", |
119 "//skia", | 104 "//skia", |
120 "//third_party/mojo/src/mojo/edk/system", | 105 "//third_party/mojo/src/mojo/edk/system", |
121 "//ui/aura", | 106 "//ui/aura", |
122 "//ui/base", | 107 "//ui/base", |
123 "//ui/base/ime", | 108 "//ui/base/ime", |
124 "//ui/events", | 109 "//ui/events", |
125 "//ui/events:events_base", | 110 "//ui/events:events_base", |
126 "//ui/gfx", | 111 "//ui/gfx", |
127 "//ui/gfx/x", | 112 "//ui/gfx/x", |
128 "//ui/native_theme", | 113 "//ui/native_theme", |
129 "//ui/resources", | 114 "//ui/resources", |
130 "//ui/shell_dialogs", | 115 "//ui/shell_dialogs", |
131 "//ui/strings", | 116 "//ui/strings", |
132 "//ui/views", | 117 "//ui/views", |
133 ] | 118 ] |
134 } | 119 } |
OLD | NEW |