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