1 # Copyright (c) 2015 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/features.gni")
6 import("//build/config/linux/pkg_config.gni")
7 import("//tools/generate_library_loader/generate_library_loader.gni")
9 gypi_values = exec_script("//build/gypi_to_gn.py",
10 [ rebase_path("system.gyp") ],
14 # If brlapi isn't needed, don't require it to be installed.
16 config("brlapi_config") {
17 defines = [ "USE_BRLAPI" ]
20 # TODO(GYP) linux_link_brlapi support. Is this needed?
21 generate_library_loader("libbrlapi") {
22 name = "LibBrlapiLoader"
23 output_h = "libbrlapi.h"
24 output_cc = "libbrlapi_loader.cc"
26 config = ":brlapi_config"
28 functions = gypi_values.libbrlapi_functions
31 if (is_desktop_linux) {
32 pkg_config("gio_config") {
33 packages = [ "gio-2.0" ]
35 # glib >=2.40 deprecate g_settings_list_schemas in favor of
36 # g_settings_schema_source_list_schemas. This function is not available on
37 # earlier versions that we still need to support (specifically, 2.32), so
38 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
39 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu
40 # 13.10 (saucy) and earlier. Update the code to use
41 # g_settings_schema_source_list_schemas instead.
44 "GLIB_DISABLE_DEPRECATION_WARNINGS",
47 # TODO(brettw) Theoretically I think ignore_libs should be set so that we
48 # don't link directly to GIO and use the loader generated below. But the
49 # gio target in GYP doesn't make any sense to me and appears to link
50 # directly to GIO in addition to making a loader. This this uncommented,
51 # the link in component build fails, so I think this is closer to the
53 #ignore_libs = true # Loader generated below.
56 # This generates a target named "gio".
57 generate_library_loader("gio") {
60 output_cc = "libgio_loader.cc"
61 header = "<gio/gio.h>"
62 config = "//build/linux:gio_config"
64 functions = gypi_values.libgio_functions
68 # This generates a target named "libpci".
69 generate_library_loader("libpci") {
72 output_cc = "libpci_loader.cc"
73 header = "<pci/pci.h>"
75 functions = gypi_values.libpci_functions
78 # Looking for libspeechd? Use //third_party/speech-dispatcher
80 # This generates a target named "udev0_loader".
81 generate_library_loader("udev0_loader") {
82 name = "LibUdev0Loader"
83 output_h = "libudev0.h"
84 output_cc = "libudev0_loader.cc"
85 header = "\"third_party/libudev/libudev0.h\""
87 functions = gypi_values.libudev_functions
90 # This generates a target named "udev1_loader".
91 generate_library_loader("udev1_loader") {
92 name = "LibUdev1Loader"
93 output_h = "libudev1.h"
94 output_cc = "libudev1_loader.cc"
95 header = "\"third_party/libudev/libudev1.h\""
97 functions = gypi_values.libudev_functions