OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//build/config/features.gni") |
| 6 import("//build/config/linux/pkg_config.gni") |
| 7 import("//tools/generate_library_loader/generate_library_loader.gni") |
| 8 |
| 9 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 10 [ rebase_path("system.gyp") ], |
| 11 "scope", |
| 12 [ "system.gyp" ]) |
| 13 |
| 14 # If brlapi isn't needed, don't require it to be installed. |
| 15 if (use_brlapi) { |
| 16 config("brlapi_config") { |
| 17 defines = [ "USE_BRLAPI" ] |
| 18 } |
| 19 |
| 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" |
| 25 header = "<brlapi.h>" |
| 26 config = ":brlapi_config" |
| 27 |
| 28 functions = gypi_values.libbrlapi_functions |
| 29 } |
| 30 } |
| 31 if (is_desktop_linux) { |
| 32 pkg_config("gio_config") { |
| 33 packages = [ "gio-2.0" ] |
| 34 |
| 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. |
| 42 defines = [ |
| 43 "USE_GIO", |
| 44 "GLIB_DISABLE_DEPRECATION_WARNINGS", |
| 45 ] |
| 46 |
| 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 |
| 52 # GYP build. |
| 53 #ignore_libs = true # Loader generated below. |
| 54 } |
| 55 |
| 56 # This generates a target named "gio". |
| 57 generate_library_loader("gio") { |
| 58 name = "LibGioLoader" |
| 59 output_h = "libgio.h" |
| 60 output_cc = "libgio_loader.cc" |
| 61 header = "<gio/gio.h>" |
| 62 config = "//build/linux:gio_config" |
| 63 |
| 64 functions = gypi_values.libgio_functions |
| 65 } |
| 66 } |
| 67 |
| 68 # This generates a target named "libpci". |
| 69 generate_library_loader("libpci") { |
| 70 name = "LibPciLoader" |
| 71 output_h = "libpci.h" |
| 72 output_cc = "libpci_loader.cc" |
| 73 header = "<pci/pci.h>" |
| 74 |
| 75 functions = gypi_values.libpci_functions |
| 76 } |
| 77 |
| 78 # Looking for libspeechd? Use //third_party/speech-dispatcher |
| 79 |
| 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\"" |
| 86 |
| 87 functions = gypi_values.libudev_functions |
| 88 } |
| 89 |
| 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\"" |
| 96 |
| 97 functions = gypi_values.libudev_functions |
| 98 } |
| 99 |
| 100 group("udev") { |
| 101 deps = [ |
| 102 ":udev0_loader", |
| 103 ":udev1_loader", |
| 104 ] |
| 105 } |
OLD | NEW |