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

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

Issue 1518073002: More build config cleanup. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: ERROR, not FATAL Created 5 years 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 | « build/config/fnl/BUILD.gn ('k') | build/config/ui.gni » ('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) 2013 The Chromium Authors. All rights reserved. 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 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/linux/pkg_config.gni") 5 import("//build/config/linux/pkg_config.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/config/sysroot.gni") 7 import("//build/config/sysroot.gni")
8 import("//build/config/ui.gni") 8 import("//build/config/ui.gni")
9 import("//tools/generate_library_loader/generate_library_loader.gni") 9 import("//tools/generate_library_loader/generate_library_loader.gni")
10 10
11 gypi_values = exec_script("//build/gypi_to_gn.py",
12 [ rebase_path("../../linux/system.gyp") ],
13 "scope",
14 [ "../../linux/system.gyp" ])
15
16 config("sdk") { 11 config("sdk") {
17 if (sysroot != "") { 12 if (sysroot != "") {
18 cflags = [ "--sysroot=" + sysroot ] 13 cflags = [ "--sysroot=" + sysroot ]
19 ldflags = [ "--sysroot=" + sysroot ] 14 ldflags = [ "--sysroot=" + sysroot ]
20 15
21 # Need to get some linker flags out of the sysroot. 16 # Need to get some linker flags out of the sysroot.
22 ldflags += [ exec_script("sysroot_ld_path.py", 17 ldflags += [ exec_script("sysroot_ld_path.py",
23 [ 18 [
24 rebase_path("//build/linux/sysroot_ld_path.sh", 19 rebase_path("//build/linux/sysroot_ld_path.sh",
25 root_build_dir), 20 root_build_dir),
(...skipping 10 matching lines...) Expand all
36 } 31 }
37 32
38 config("fontconfig") { 33 config("fontconfig") {
39 libs = [ "fontconfig" ] 34 libs = [ "fontconfig" ]
40 } 35 }
41 36
42 pkg_config("freetype2") { 37 pkg_config("freetype2") {
43 packages = [ "freetype2" ] 38 packages = [ "freetype2" ]
44 } 39 }
45 40
46 pkg_config("pangocairo") {
47 packages = [ "pangocairo" ]
48 }
49
50 pkg_config("pangoft2") {
51 packages = [ "pangoft2" ]
52 }
53
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).
56 pkg_config("dbus") {
57 packages = [ "dbus-1" ]
58 }
59
60 if (use_evdev_gestures) {
61 pkg_config("libevdev-cros") {
62 packages = [ "libevdev-cros" ]
63 }
64
65 pkg_config("libgestures") {
66 packages = [ "libgestures" ]
67 }
68 }
69
70 config("x11") { 41 config("x11") {
71 libs = [ 42 libs = [
72 "X11", 43 "X11",
73 "Xi", 44 "Xi",
74 ] 45 ]
75 } 46 }
76 47
77 config("xcomposite") { 48 config("xcomposite") {
78 libs = [ "Xcomposite" ] 49 libs = [ "Xcomposite" ]
79 } 50 }
80 51
81 config("xext") { 52 config("xext") {
82 libs = [ "Xext" ] 53 libs = [ "Xext" ]
83 } 54 }
84 55
85 config("libcap") { 56 config("libcap") {
86 libs = [ "cap" ] 57 libs = [ "cap" ]
87 } 58 }
88 59
89 config("libresolv") { 60 config("libresolv") {
90 libs = [ "resolv" ] 61 libs = [ "resolv" ]
91 } 62 }
92 63
93 pkg_config("gio_config") {
94 packages = [ "gio-2.0" ]
95
96 # glib >=2.40 deprecate g_settings_list_schemas in favor of
97 # g_settings_schema_source_list_schemas. This function is not available on
98 # earlier versions that we still need to support (specifically, 2.32), so
99 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
100 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
101 # (saucy) and earlier. Update the code to use
102 # g_settings_schema_source_list_schemas instead.
103 defines = [
104 "USE_GIO",
105 "GLIB_DISABLE_DEPRECATION_WARNINGS",
106 ]
107
108 # TODO(brettw) Theoretically I think ignore_libs should be set so that we
109 # don't link directly to GIO and use the loader generated below. But the gio
110 # target in GYP doesn't make any sense to me and appears to link directly to
111 # GIO in addition to making a loader. This this uncommented, the link in
112 # component build fails, so I think this is closer to the GYP build.
113 #ignore_libs = true # Loader generated below.
114 }
115
116 if (is_desktop_linux) {
117 # This generates a target named "gio".
118 generate_library_loader("gio") {
119 name = "LibGioLoader"
120 output_h = "libgio.h"
121 output_cc = "libgio_loader.cc"
122 header = "<gio/gio.h>"
123 config = ":gio_config"
124
125 functions = gypi_values.libgio_functions
126 }
127 }
128
129 # This generates a target named "libpci". 64 # This generates a target named "libpci".
130 generate_library_loader("libpci") { 65 generate_library_loader("libpci") {
131 name = "LibPciLoader" 66 name = "LibPciLoader"
132 output_h = "libpci.h" 67 output_h = "libpci.h"
133 output_cc = "libpci_loader.cc" 68 output_cc = "libpci_loader.cc"
134 header = "<pci/pci.h>" 69 header = "<pci/pci.h>"
135 70
136 functions = gypi_values.libpci_functions 71 functions = [
72 "pci_alloc",
73 "pci_init",
74 "pci_cleanup",
75 "pci_scan_bus",
76 "pci_fill_info",
77 "pci_lookup_name",
78 ]
137 } 79 }
138 80
139 # Looking for libspeechd? Use //third_party/speech-dispatcher 81 libudev_functions = [
82 "udev_device_get_action",
83 "udev_device_get_devnode",
84 "udev_device_get_parent",
85 "udev_device_get_parent_with_subsystem_devtype",
86 "udev_device_get_property_value",
87 "udev_device_get_subsystem",
88 "udev_device_get_sysattr_value",
89 "udev_device_get_sysname",
90 "udev_device_get_syspath",
91 "udev_device_new_from_devnum",
92 "udev_device_new_from_subsystem_sysname",
93 "udev_device_new_from_syspath",
94 "udev_device_unref",
95 "udev_enumerate_add_match_subsystem",
96 "udev_enumerate_get_list_entry",
97 "udev_enumerate_new",
98 "udev_enumerate_scan_devices",
99 "udev_enumerate_unref",
100 "udev_list_entry_get_next",
101 "udev_list_entry_get_name",
102 "udev_monitor_enable_receiving",
103 "udev_monitor_filter_add_match_subsystem_devtype",
104 "udev_monitor_get_fd",
105 "udev_monitor_new_from_netlink",
106 "udev_monitor_receive_device",
107 "udev_monitor_unref",
108 "udev_new",
109 "udev_set_log_fn",
110 "udev_set_log_priority",
111 "udev_unref",
112 ]
140 113
141 # This generates a target named "udev0_loader". 114 # This generates a target named "udev0_loader".
142 generate_library_loader("udev0_loader") { 115 generate_library_loader("udev0_loader") {
143 name = "LibUdev0Loader" 116 name = "LibUdev0Loader"
144 output_h = "libudev0.h" 117 output_h = "libudev0.h"
145 output_cc = "libudev0_loader.cc" 118 output_cc = "libudev0_loader.cc"
146 header = "\"third_party/libudev/libudev0.h\"" 119 header = "\"third_party/libudev/libudev0.h\""
147 120
148 functions = gypi_values.libudev_functions 121 functions = libudev_functions
149 } 122 }
150 123
151 # This generates a target named "udev1_loader". 124 # This generates a target named "udev1_loader".
152 generate_library_loader("udev1_loader") { 125 generate_library_loader("udev1_loader") {
153 name = "LibUdev1Loader" 126 name = "LibUdev1Loader"
154 output_h = "libudev1.h" 127 output_h = "libudev1.h"
155 output_cc = "libudev1_loader.cc" 128 output_cc = "libudev1_loader.cc"
156 header = "\"third_party/libudev/libudev1.h\"" 129 header = "\"third_party/libudev/libudev1.h\""
157 130
158 functions = gypi_values.libudev_functions 131 functions = libudev_functions
159 } 132 }
160 133
161 group("udev") { 134 group("udev") {
162 deps = [ 135 deps = [
163 ":udev0_loader", 136 ":udev0_loader",
164 ":udev1_loader", 137 ":udev1_loader",
165 ] 138 ]
166 } 139 }
OLDNEW
« no previous file with comments | « build/config/fnl/BUILD.gn ('k') | build/config/ui.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698