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),
23 # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
24 # OS_LINUX and the like.
26 defines = [ "OS_CHROMEOS" ]
30 config("fontconfig") {
31 libs = [ "fontconfig" ]
34 pkg_config("freetype2") {
35 packages = [ "freetype2" ]
39 packages = [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ]
42 pkg_config("pangocairo") {
43 packages = [ "pangocairo" ]
46 pkg_config("pangoft2") {
47 packages = [ "pangoft2" ]
51 packages = [ "libudev" ]
54 # Note: if your target also depends on //dbus, you don't need to add this
55 # config (it will get added automatically if you depend on //dbus).
57 packages = [ "dbus-1" ]
60 if (use_evdev_gestures) {
61 pkg_config("libevdev-cros") {
62 packages = [ "libevdev-cros" ]
65 pkg_config("libgestures") {
66 packages = [ "libgestures" ]
84 config("xcomposite") {
85 libs = [ "Xcomposite" ]
96 config("xscrnsaver") {
112 config("libresolv") {
116 # CrOS doesn't install GTK, gconf or any gnome packages.
118 # These packages should _only_ be expected when building for a target.
119 # If these extra checks are not run, gconf is required when building host
120 # tools for a CrOS build.
121 if (current_toolchain == default_toolchain) {
122 pkg_config("gconf") {
123 packages = [ "gconf-2.0" ]
124 defines = [ "USE_GCONF" ]
129 # If brlapi isn't needed, don't require it to be installed.
131 config("brlapi_config") {
132 defines = [ "USE_BRLAPI" ]
135 # TODO(GYP) linux_link_brlapi support. Is this needed?
136 generate_library_loader("libbrlapi") {
137 name = "LibBrlapiLoader"
138 output_h = "libbrlapi.h"
139 output_cc = "libbrlapi_loader.cc"
140 header = "<brlapi.h>"
141 config = ":brlapi_config"
144 "brlapi_getHandleSize",
145 "brlapi_error_location",
147 "brlapi__acceptKeys",
148 "brlapi__openConnection",
149 "brlapi__closeConnection",
150 "brlapi__getDisplaySize",
151 "brlapi__enterTtyModeWithPath",
152 "brlapi__leaveTtyMode",
159 pkg_config("gio_config") {
160 packages = [ "gio-2.0" ]
161 # glib >=2.40 deprecate g_settings_list_schemas in favor of
162 # g_settings_schema_source_list_schemas. This function is not available on
163 # earlier versions that we still need to support (specifically, 2.32), so
164 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
165 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
166 # (saucy) and earlier. Update the code to use
167 # g_settings_schema_source_list_schemas instead.
168 defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ]
170 # TODO(brettw) Theoretically I think ignore_libs should be set so that we
171 # don't link directly to GIO and use the loader generated below. But the gio
172 # target in GYP doesn't make any sense to me and appears to link directly to
173 # GIO in addition to making a loader. This this uncommented, the link in
174 # component build fails, so I think this is closer to the GYP build.
175 #ignore_libs = true # Loader generated below.
178 # This generates a target named "gio".
179 generate_library_loader("gio") {
180 name = "LibGioLoader"
181 output_h = "libgio.h"
182 output_cc = "libgio_loader.cc"
183 header = "<gio/gio.h>"
184 config = ":gio_config"
188 "g_settings_get_child",
189 "g_settings_get_string",
190 "g_settings_get_boolean",
191 "g_settings_get_int",
192 "g_settings_get_strv",
193 "g_settings_list_schemas",
197 # This generates a target named "libpci".
198 generate_library_loader("libpci") {
199 name = "LibPciLoader"
200 output_h = "libpci.h"
201 output_cc = "libpci_loader.cc"
202 header = "<pci/pci.h>"
214 # Looking for libspeechd? Use //third_party/speech-dispatcher