Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: build/linux/BUILD.gn

Issue 1945893002: Split generated libraries out of //build/linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .gn ('k') | build/linux/libbrlapi/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/linux/pkg_config.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 7
14 # If brlapi isn't needed, don't require it to be installed. 8 # If brlapi isn't needed, don't require it to be installed.
15 if (use_brlapi) { 9 if (use_brlapi) {
16 config("brlapi_config") { 10 deps = [
17 defines = [ "USE_BRLAPI" ] 11 "//build/linux/libbrlapi",
18 } 12 ]
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 } 13 }
31 if (use_gio) { 14 if (use_gio) {
32 pkg_config("gio_config") { 15 pkg_config("gio_config") {
33 packages = [ "gio-2.0" ] 16 packages = [ "gio-2.0" ]
34 17
35 # glib >=2.40 deprecate g_settings_list_schemas in favor of 18 # glib >=2.40 deprecate g_settings_list_schemas in favor of
36 # g_settings_schema_source_list_schemas. This function is not available on 19 # 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 20 # earlier versions that we still need to support (specifically, 2.32), so
38 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define. 21 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
39 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 22 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu
40 # 13.10 (saucy) and earlier. Update the code to use 23 # 13.10 (saucy) and earlier. Update the code to use
41 # g_settings_schema_source_list_schemas instead. 24 # g_settings_schema_source_list_schemas instead.
42 defines = [ 25 defines = [
43 "USE_GIO", 26 "USE_GIO",
44 "GLIB_DISABLE_DEPRECATION_WARNINGS", 27 "GLIB_DISABLE_DEPRECATION_WARNINGS",
45 ] 28 ]
46 29
47 # TODO(brettw) Theoretically I think ignore_libs should be set so that we 30 # 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 31 # 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 32 # 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, 33 # 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 34 # the link in component build fails, so I think this is closer to the
52 # GYP build. 35 # GYP build.
53 #ignore_libs = true # Loader generated below. 36 #ignore_libs = true # Loader generated below.
54 } 37 }
55 38
56 # This generates a target named "gio". 39 deps = [
57 generate_library_loader("gio") { 40 "//build/linux/libgio",
58 name = "LibGioLoader" 41 ]
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 } 42 }
77 43
78 # Looking for libspeechd? Use //third_party/speech-dispatcher 44 # Looking for libspeechd? Use //third_party/speech-dispatcher
79 45
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 public_deps = [
102 ":udev0_loader",
103 ":udev1_loader",
104 ]
105 }
106
107 group("fontconfig") { 46 group("fontconfig") {
108 if (is_chromecast) { 47 if (is_chromecast) {
109 # Chromecast platform does not provide fontconfig 48 # Chromecast platform does not provide fontconfig
110 public_deps = [ 49 public_deps = [
111 "//third_party/fontconfig", 50 "//third_party/fontconfig",
112 ] 51 ]
113 } else { 52 } else {
114 public_configs = [ "//build/config/linux:fontconfig" ] 53 public_configs = [ "//build/config/linux:fontconfig" ]
115 } 54 }
116 } 55 }
117 56
118 if (!is_chromecast) { 57 if (!is_chromecast) {
119 pkg_config("freetype2_config") { 58 pkg_config("freetype2_config") {
120 visibility = [ ":freetype2" ] 59 visibility = [ ":freetype2" ]
121 packages = [ "freetype2" ] 60 packages = [ "freetype2" ]
122 } 61 }
123 } 62 }
124 63
125 group("freetype2") { 64 group("freetype2") {
126 if (is_chromecast) { 65 if (is_chromecast) {
127 # Chromecast platform doesn't provide freetype, so use Chromium's. 66 # Chromecast platform doesn't provide freetype, so use Chromium's.
128 # The version in freetype-android is unmodified from freetype2 upstream. 67 # The version in freetype-android is unmodified from freetype2 upstream.
129 public_deps = [ 68 public_deps = [
130 "//third_party/freetype-android:freetype", 69 "//third_party/freetype-android:freetype",
131 ] 70 ]
132 } else { 71 } else {
133 public_configs = [ ":freetype2_config" ] 72 public_configs = [ ":freetype2_config" ]
134 } 73 }
135 } 74 }
OLDNEW
« no previous file with comments | « .gn ('k') | build/linux/libbrlapi/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698