Index: ui/accessibility/BUILD.gn |
diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn |
index 9c679815c1bd8f4fca4dcf1979fd64ea05d5c825..3902322f243be1cd9f837ea89a46a1cc6673479b 100644 |
--- a/ui/accessibility/BUILD.gn |
+++ b/ui/accessibility/BUILD.gn |
@@ -2,6 +2,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//build/config/linux/pkg_config.gni") |
import("//build/config/ui.gni") |
import("//build/json_schema_api.gni") |
import("//testing/test.gni") |
@@ -9,6 +10,32 @@ if (is_android) { |
import("//build/config/android/rules.gni") |
} |
+pkg_config("atk") { |
Dirk Pranke
2015/07/08 19:33:05
this and the above change probably need to be prot
brettw
2015/07/08 20:11:17
Yeah, looks like x11 is the correct condition.
llandwerlin-old
2015/07/08 20:21:07
It was under the x11 condition in build/config/lin
|
+ packages = [ "atk" ] |
+ atk_lib_dir = exec_script(pkg_config_script, |
+ [ |
+ "--libdir", |
+ "atk", |
+ ], |
+ "string") |
+ defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ] |
+} |
+ |
+# gn orders flags on a target before flags from configs. The default config |
+# adds -Wall, and these flags have to be after -Wall -- so they need to come |
+# from a config and can't be on the target directly. |
+config("atk_warnings") { |
+ cflags = [ |
+ # glib uses the pre-c++11 typedef-as-static_assert hack. |
+ "-Wno-unused-local-typedef", |
+ |
+ # G_DEFINE_TYPE automatically generates a *get_instance_private |
+ # inline function after glib 2.37. That's unused. Prevent to |
+ # complain about it. |
+ "-Wno-unused-function", |
+ ] |
+} |
+ |
component("accessibility") { |
sources = [ |
"ax_node.cc", |
@@ -61,8 +88,8 @@ component("accessibility") { |
] |
configs += [ |
- "//build/config/linux:atk", |
- "//build/config/linux:atk_warnings", |
+ ":atk", |
+ ":atk_warnings", |
"//build/config/linux:gconf", |
"//build/config/linux:glib", |
] |