1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/linux/pkg_config.gni")
6 import("//build/config/features.gni")
7 import("//build/config/sysroot.gni")
8 import("//build/config/ui.gni")
12 cflags = [ "--sysroot=" + sysroot ]
13 ldflags = [ "--sysroot=" + sysroot ]
15 # Need to get some linker flags out of the sysroot.
16 ldflags += [ exec_script("sysroot_ld_path.py",
18 rebase_path("//build/linux/sysroot_ld_path.sh",
25 # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
26 # OS_LINUX and the like.
28 defines = [ "OS_CHROMEOS" ]
32 config("fontconfig") {
33 libs = [ "fontconfig" ]
36 pkg_config("freetype2") {
37 packages = [ "freetype2" ]
49 pkg_config("pangocairo") {
50 packages = [ "pangocairo" ]
53 pkg_config("pangoft2") {
54 packages = [ "pangoft2" ]
57 # Note: if your target also depends on //dbus, you don't need to add this
58 # config (it will get added automatically if you depend on //dbus).
60 packages = [ "dbus-1" ]
77 config("xcomposite") {
78 libs = [ "Xcomposite" ]
89 config("xscrnsaver") {
109 config("libresolv") {
113 # CrOS doesn't install GTK, gconf or any gnome packages.
114 if (!is_chromeos && use_gconf) {
115 # These packages should _only_ be expected when building for a target.
116 # If these extra checks are not run, gconf is required when building host
117 # tools for a CrOS build.
118 if (current_toolchain == default_toolchain) {
121 atk_lib_dir = exec_script(pkg_config_script,
127 defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ]
130 # gn orders flags on a target before flags from configs. The default config
131 # adds -Wall, and these flags have to be after -Wall -- so they need to
132 # come from a config and can't be on the target directly.
133 config("atk_warnings") {
135 # glib uses the pre-c++11 typedef-as-static_assert hack.
136 "-Wno-unused-local-typedef",
138 # G_DEFINE_TYPE automatically generates a *get_instance_private
139 # inline function after glib 2.37. That's unused. Prevent to
141 "-Wno-unused-function",
145 pkg_config("gconf") {
146 packages = [ "gconf-2.0" ]
147 defines = [ "USE_GCONF" ]