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

Unified Diff: build/config/linux/BUILD.gn

Issue 109443004: Separate out pkg-config execution in the GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/linux/BUILD.gn
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 1a9507c07ef8e597a90bff8afbb526c3f2216ba8..a7b841c7adc2bce63309423f6adfa6865ccf3bc2 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("pkg_config.gni")
+
# Sets up the dynamic library search path to include our "lib" directory.
config("executable_ldconfig") {
ldflags = [
@@ -13,58 +15,31 @@ config("executable_ldconfig") {
]
}
-# This script returns a list consisting of two nested lists: the first is the
-# list of cflags, the second are the linker flags.
-pkg_script = "pkg-config.py"
-
config("fontconfig") {
libs = [ "fontconfig" ]
}
-config("freetype2") {
- pkgresult = exec_script(pkg_script, [ "freetype2" ], "value")
- include_dirs = pkgresult[0]
- cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
+pkg_config("freetype2") {
+ packages = [ "freetype2" ]
}
-config("glib") {
- pkgresult = exec_script(pkg_script,
- [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ], "value" )
- include_dirs = pkgresult[0]
- cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
+pkg_config("glib") {
+ packages = [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ]
}
-config("gtk") {
+pkg_config("gtk") {
# Gtk requires gmodule, but it does not list it as a dependency in some
# misconfigured systems.
- pkgresult = exec_script(pkg_script,
- [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ], "value" )
- include_dirs = pkgresult[0]
- cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
-
+ packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
defines = [ "TOOLKIT_GTK" ]
}
-config("pangocairo") {
- pkgresult = exec_script(pkg_script, [ "pangocairo" ], "value" )
- include_dirs = pkgresult[0]
- cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
+pkg_config("pangocairo") {
+ packages = [ "pangocairo" ]
}
-config("udev") {
- pkgresult = exec_script(pkg_script, [ "libudev" ], "value" )
- include_dirs = pkgresult[0]
- cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
+pkg_config("udev") {
+ packages = [ "libudev" ]
}
config("x11") {
« no previous file with comments | « no previous file | build/config/linux/pkg_config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698