Chromium Code Reviews| 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 | 9 |
| 9 component("libgtk2ui") { | 10 component("libgtk2ui") { |
| 10 sources = [ | 11 sources = [ |
| 11 "app_indicator_icon.cc", | 12 "app_indicator_icon.cc", |
| 12 "app_indicator_icon.h", | 13 "app_indicator_icon.h", |
| 13 "app_indicator_icon_menu.cc", | 14 "app_indicator_icon_menu.cc", |
| 14 "app_indicator_icon_menu.h", | 15 "app_indicator_icon_menu.h", |
| 15 "chrome_gtk_frame.cc", | 16 "chrome_gtk_frame.cc", |
| 16 "chrome_gtk_frame.h", | 17 "chrome_gtk_frame.h", |
| 17 "chrome_gtk_menu_subclasses.cc", | 18 "chrome_gtk_menu_subclasses.cc", |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 ] | 57 ] |
| 57 | 58 |
| 58 if (use_gconf) { | 59 if (use_gconf) { |
| 59 sources += [ | 60 sources += [ |
| 60 "gconf_listener.cc", | 61 "gconf_listener.cc", |
| 61 "gconf_listener.h", | 62 "gconf_listener.h", |
| 62 ] | 63 ] |
| 63 } | 64 } |
| 64 defines = [ "LIBGTK2UI_IMPLEMENTATION" ] | 65 defines = [ "LIBGTK2UI_IMPLEMENTATION" ] |
| 65 | 66 |
| 66 configs += [ | 67 configs += [ "//build/config/linux:gconf" ] |
| 67 "//build/config/linux:gconf", | |
| 68 ] | |
| 69 | 68 |
| 70 if (use_cups) { | 69 if (use_cups) { |
| 71 configs += [ | 70 configs += [ "//printing:cups" ] |
| 72 "//printing:cups", | |
| 73 ] | |
| 74 } | 71 } |
| 75 | 72 |
| 76 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. | 73 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. |
| 77 # To avoid missing indirectly referenced harfbuzz symbols from pango, | 74 # To avoid missing indirectly referenced harfbuzz symbols from pango, |
| 78 # some hack is required when bundled harfbuzz is used and component build is | 75 # some hack is required when bundled harfbuzz is used and component build is |
| 79 # disabled. | 76 # disabled. |
| 80 # See crbug.com/462689 for details. | 77 # See crbug.com/462689 for details. |
| 81 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] | 78 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] |
| 82 | 79 |
| 83 # gn orders flags on a target before flags from configs. The default config | 80 # gn orders flags on a target before flags from configs. The default config |
| 84 # adds -Wall, and these flags have to be after -Wall -- so they need to come | 81 # adds -Wall, and these flags have to be after -Wall -- so they need to come |
| 85 # from a config and can't be on the target directly. | 82 # from a config and can't be on the target directly. |
| 86 config("libgtk2ui_warnings") { | 83 config("libgtk2ui_warnings") { |
| 87 if (is_clang) { | 84 if (is_clang) { |
| 88 cflags = [ | 85 cflags = [ |
| 89 # G_DEFINE_TYPE automatically generates a *get_instance_private inline | 86 # G_DEFINE_TYPE automatically generates a *get_instance_private inline |
| 90 # function after glib 2.37. That's unused. Prevent to complain about it. | 87 # function after glib 2.37. That's unused. Prevent to complain about it. |
| 91 "-Wno-unused-function", | 88 "-Wno-unused-function", |
| 92 | 89 |
| 93 # G_STATIC_ASSERT uses a typedef as a static_assert. | 90 # G_STATIC_ASSERT uses a typedef as a static_assert. |
| 94 "-Wno-unused-local-typedef", | 91 "-Wno-unused-local-typedef", |
| 92 | |
| 93 # When compiling with GTK3, some of the functions have deprecation | |
| 94 # warnings. | |
| 95 "-Wno-deprecated-declarations", | |
|
knthzh
2015/08/24 20:52:01
This isn't necessary anymore. I found out that gtk
Nico
2015/08/25 00:23:52
Cool, remove this then I guess.
| |
| 95 ] | 96 ] |
| 96 } | 97 } |
| 97 } | 98 } |
| 98 configs += [ | 99 configs += [ |
| 99 ":libgtk2ui_warnings", | 100 ":libgtk2ui_warnings", |
| 100 "//build/config/linux:x11", | 101 "//build/config/linux:x11", |
| 101 ] | 102 ] |
| 102 | 103 |
| 103 deps = [ | 104 deps = [ |
| 104 "//base", | 105 "//base", |
| 105 "//base/third_party/dynamic_annotations", | 106 "//base/third_party/dynamic_annotations", |
| 106 "//base:i18n", | 107 "//base:i18n", |
| 107 "//build/config/linux/gtk", | |
| 108 "//build/config/linux/gtk:gtkprint", | |
| 109 "//chrome/app/theme:theme_resources", | 108 "//chrome/app/theme:theme_resources", |
| 110 "//chrome:extra_resources", | 109 "//chrome:extra_resources", |
| 111 "//chrome:resources", | 110 "//chrome:resources", |
| 112 "//chrome:strings", | 111 "//chrome:strings", |
| 113 "//components/resources", | 112 "//components/resources", |
| 114 "//content/public/browser", | 113 "//content/public/browser", |
| 115 "//mojo/environment:chromium", | 114 "//mojo/environment:chromium", |
| 116 "//printing", | 115 "//printing", |
| 117 "//skia", | 116 "//skia", |
| 118 "//third_party/mojo/src/mojo/edk/system", | 117 "//third_party/mojo/src/mojo/edk/system", |
| 119 "//ui/aura", | 118 "//ui/aura", |
| 120 "//ui/base", | 119 "//ui/base", |
| 121 "//ui/base/ime", | 120 "//ui/base/ime", |
| 122 "//ui/events", | 121 "//ui/events", |
| 123 "//ui/events:events_base", | 122 "//ui/events:events_base", |
| 124 "//ui/gfx", | 123 "//ui/gfx", |
| 125 "//ui/gfx/x", | 124 "//ui/gfx/x", |
| 126 "//ui/native_theme", | 125 "//ui/native_theme", |
| 127 "//ui/resources", | 126 "//ui/resources", |
| 128 "//ui/shell_dialogs", | 127 "//ui/shell_dialogs", |
| 129 "//ui/strings", | 128 "//ui/strings", |
| 130 "//ui/views", | 129 "//ui/views", |
| 131 ] | 130 ] |
| 131 | |
| 132 if (use_gtk3) { | |
| 133 deps += [ | |
| 134 "//build/config/linux/gtk3", | |
| 135 "//build/config/linux/gtk3:gtkprint3", | |
| 136 ] | |
| 137 } else { | |
| 138 deps += [ | |
| 139 "//build/config/linux/gtk2", | |
| 140 "//build/config/linux/gtk2:gtkprint2", | |
| 141 ] | |
| 142 } | |
| 132 } | 143 } |
| OLD | NEW |