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")
9 import("//tools/generate_library_loader/generate_library_loader.gni")
13 cflags = [ "--sysroot=" + sysroot ]
14 ldflags = [ "--sysroot=" + sysroot ]
16 # Need to get some linker flags out of the sysroot.
17 ldflags += [ exec_script("sysroot_ld_path.py",
18 [ rebase_path("//build/linux/sysroot_ld_path.sh", root_build_dir),
24 config("fontconfig") {
25 libs = [ "fontconfig" ]
28 pkg_config("freetype2") {
29 packages = [ "freetype2" ]
33 packages = [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ]
37 # Gtk requires gmodule, but it does not list it as a dependency in some
38 # misconfigured systems.
39 packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
42 pkg_config("gtkprint") {
43 packages = [ "gtk+-unix-print-2.0" ]
46 pkg_config("pangocairo") {
47 packages = [ "pangocairo" ]
50 pkg_config("pangoft2") {
51 packages = [ "pangoft2" ]
55 packages = [ "libudev" ]
58 # Note: if your target also depends on //dbus, you don't need to add this
59 # config (it will get added automatically if you depend on //dbus).
61 packages = [ "dbus-1" ]
64 pkg_config("gnome_keyring") {
65 packages = [ "gnome-keyring-1" ]
68 if (use_evdev_gestures) {
69 pkg_config("libevdev-cros") {
70 packages = [ "libevdev-cros" ]
73 pkg_config("libgestures") {
74 packages = [ "libgestures" ]
79 # Don't bother running pkg-config for these X related libraries since it just
80 # returns the same libs, and forking pkg-config is slow.
95 config("xcomposite") {
96 libs = [ "Xcomposite" ]
107 config("xscrnsaver") {
123 config("libresolv") {
127 pkg_config("gconf") {
128 packages = [ "gconf-2.0" ]
129 defines = [ "USE_GCONF" ]
132 # If brlapi isn't needed, don't require it to be installed.
134 config("brlapi_config") {
135 defines = [ "USE_BRLAPI" ]
138 # TODO(GYP) linux_link_brlapi support. Is this needed?
139 generate_library_loader("libbrlapi") {
140 name = "LibBrlapiLoader"
141 output_h = "libbrlapi.h"
142 output_cc = "libbrlapi_loader.cc"
143 header = "<brlapi.h>"
144 config = ":brlapi_config"
148 pkg_config("gio_config") {
149 packages = [ "gio-2.0" ]
150 defines = [ "USE_GIO" ]
151 ignore_libs = true # Loader generated below.
154 # This generates a target named "gio".
155 generate_library_loader("gio") {
156 name = "LibGioLoader"
157 output_h = "libgio.h"
158 output_cc = "libgio_loader.cc"
159 header = "<gio/gio.h>"
160 config = ":gio_config"
164 "g_settings_get_child",
165 "g_settings_get_string",
166 "g_settings_get_boolean",
167 "g_settings_get_int",
168 "g_settings_get_strv",
169 "g_settings_list_schemas",
173 # This generates a target named "libpci".
174 generate_library_loader("libpci") {
175 name = "LibPciLoader"
176 output_h = "libpci.h"
177 output_cc = "libpci_loader.cc"
178 header = "<pci/pci.h>"
190 # Looking for libspeechd? Use //third_party/speech-dispatcher