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/ui.gni") | 8 import("//build/config/ui.gni") |
9 | 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 |
10 component("libgtk2ui") { | 26 component("libgtk2ui") { |
11 sources = [ | 27 sources = [ |
12 "app_indicator_icon.cc", | 28 "app_indicator_icon.cc", |
13 "app_indicator_icon.h", | 29 "app_indicator_icon.h", |
14 "app_indicator_icon_menu.cc", | 30 "app_indicator_icon_menu.cc", |
15 "app_indicator_icon_menu.h", | 31 "app_indicator_icon_menu.h", |
16 "chrome_gtk_frame.cc", | 32 "chrome_gtk_frame.cc", |
17 "chrome_gtk_frame.h", | 33 "chrome_gtk_frame.h", |
18 "chrome_gtk_menu_subclasses.cc", | 34 "chrome_gtk_menu_subclasses.cc", |
19 "chrome_gtk_menu_subclasses.h", | 35 "chrome_gtk_menu_subclasses.h", |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 configs += [ "//printing:cups" ] | 83 configs += [ "//printing:cups" ] |
68 } | 84 } |
69 | 85 |
70 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. | 86 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. |
71 # To avoid missing indirectly referenced harfbuzz symbols from pango, | 87 # To avoid missing indirectly referenced harfbuzz symbols from pango, |
72 # some hack is required when bundled harfbuzz is used and component build is | 88 # some hack is required when bundled harfbuzz is used and component build is |
73 # disabled. | 89 # disabled. |
74 # See crbug.com/462689 for details. | 90 # See crbug.com/462689 for details. |
75 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] | 91 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] |
76 | 92 |
77 # gn orders flags on a target before flags from configs. The default config | |
78 # adds -Wall, and these flags have to be after -Wall -- so they need to come | |
79 # from a config and can't be on the target directly. | |
80 config("libgtk2ui_warnings") { | |
81 if (is_clang) { | |
82 cflags = [ | |
83 # G_DEFINE_TYPE automatically generates a *get_instance_private inline | |
84 # function after glib 2.37. That's unused. Prevent to complain about it. | |
85 "-Wno-unused-function", | |
86 | |
87 # G_STATIC_ASSERT uses a typedef as a static_assert. | |
88 "-Wno-unused-local-typedef", | |
89 ] | |
90 } | |
91 } | |
92 configs += [ | 93 configs += [ |
93 ":libgtk2ui_warnings", | 94 ":libgtk2ui_warnings", |
94 "//build/config/linux:x11", | 95 "//build/config/linux:x11", |
95 ] | 96 ] |
96 | 97 |
97 deps = [ | 98 deps = [ |
98 "//base", | 99 "//base", |
99 "//base/third_party/dynamic_annotations", | 100 "//base/third_party/dynamic_annotations", |
100 "//base:i18n", | 101 "//base:i18n", |
101 "//chrome/app/theme:theme_resources", | 102 "//chrome/app/theme:theme_resources", |
(...skipping 26 matching lines...) Expand all Loading... |
128 "//build/config/linux/gtk3", | 129 "//build/config/linux/gtk3", |
129 "//build/config/linux/gtk3:gtkprint3", | 130 "//build/config/linux/gtk3:gtkprint3", |
130 ] | 131 ] |
131 } else { | 132 } else { |
132 deps += [ | 133 deps += [ |
133 "//build/config/linux/gtk2", | 134 "//build/config/linux/gtk2", |
134 "//build/config/linux/gtk2:gtkprint2", | 135 "//build/config/linux/gtk2:gtkprint2", |
135 ] | 136 ] |
136 } | 137 } |
137 } | 138 } |
OLD | NEW |