Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/ui/libgtkui/BUILD.gn

Issue 2514413002: Clean up GTK3 build flags. (Closed)
Patch Set: Fixes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/linux/gtk/gtk.gni")
9 import("//printing/features/features.gni") 9 import("//printing/features/features.gni")
10 10
11 # gn orders flags on a target before flags from configs. The default config 11 # gn orders flags on a target before flags from configs. The default config
12 # adds -Wall, and these flags have to be after -Wall -- so they need to come 12 # adds -Wall, and these flags have to be after -Wall -- so they need to come
13 # from a config and can't be on the target directly. 13 # from a config and can't be on the target directly.
14 config("libgtkui_warnings") { 14 config("libgtkui_warnings") {
15 if (is_clang) { 15 if (is_clang) {
16 cflags = [ 16 cflags = [
17 # G_DEFINE_TYPE automatically generates a *get_instance_private inline 17 # G_DEFINE_TYPE automatically generates a *get_instance_private inline
18 # function after glib 2.37. That's unused. Prevent to complain about it. 18 # function after glib 2.37. That's unused. Prevent to complain about it.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 "//ui/gfx", 107 "//ui/gfx",
108 "//ui/gfx/geometry", 108 "//ui/gfx/geometry",
109 "//ui/gfx/x", 109 "//ui/gfx/x",
110 "//ui/native_theme", 110 "//ui/native_theme",
111 "//ui/resources", 111 "//ui/resources",
112 "//ui/shell_dialogs", 112 "//ui/shell_dialogs",
113 "//ui/strings", 113 "//ui/strings",
114 "//ui/views", 114 "//ui/views",
115 ] 115 ]
116 116
117 # Automatically depends on the GTK version associated with the current build
118 # flags.
119 group("libgtkui") {
120 if (use_gtk3) {
121 public_deps = [
122 ":libgtk3ui",
123 ]
124 } else {
125 public_deps = [
126 ":libgtk2ui",
127 ]
128 }
129 }
130
117 component("libgtk2ui") { 131 component("libgtk2ui") {
118 sources = common_sources 132 sources = common_sources
119 configs += common_configs 133 configs += common_configs
120 defines = [ "LIBGTKUI_IMPLEMENTATION" ] 134 defines = [ "LIBGTKUI_IMPLEMENTATION" ]
121 135
122 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. 136 # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz.
123 # To avoid missing indirectly referenced harfbuzz symbols from pango, 137 # To avoid missing indirectly referenced harfbuzz symbols from pango,
124 # some hack is required when bundled harfbuzz is used and component build is 138 # some hack is required when bundled harfbuzz is used and component build is
125 # disabled. 139 # disabled.
126 # See crbug.com/462689 for details. 140 # See crbug.com/462689 for details.
127 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] 141 all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ]
128 142
129 deps = common_deps + [ 143 deps = common_deps + [
130 "//build/config/linux/gtk2", 144 "//build/config/linux/gtk2",
131 "//build/config/linux/gtk2:gtkprint2", 145 "//build/config/linux/gtk2:gtkprint2",
132 ] 146 ]
133 public_deps = [ 147 public_deps = [
134 "//chrome/browser:theme_properties", 148 "//chrome/browser:theme_properties",
135 ] 149 ]
136 } 150 }
137 151
152 # This is compiled with "all" even when it's not referenced to ensure that
153 # GTK3 continues to build. GTK3 is explicitly specified by some distros.
138 component("libgtk3ui") { 154 component("libgtk3ui") {
139 sources = common_sources 155 sources = common_sources
140 configs += common_configs 156 configs += common_configs
141 defines = [ "LIBGTKUI_IMPLEMENTATION" ] 157 defines = [ "LIBGTKUI_IMPLEMENTATION" ]
142 158
143 deps = common_deps + [ 159 deps = common_deps + [
144 "//build/config/linux/gtk3", 160 "//build/config/linux/gtk3",
145 "//build/config/linux/gtk3:gtkprint3", 161 "//build/config/linux/gtk3:gtkprint3",
146 ] 162 ]
147 public_deps = [ 163 public_deps = [
148 "//chrome/browser:theme_properties", 164 "//chrome/browser:theme_properties",
149 ] 165 ]
150 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698