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

Unified Diff: build/config/linux/pkg_config.gni

Issue 549453004: GN: Fix compile errors with os==chromeos mojo/public build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signed
Patch Set: Update description Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/linux/pkg-config.py ('k') | build/toolchain/cros/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/linux/pkg_config.gni
diff --git a/build/config/linux/pkg_config.gni b/build/config/linux/pkg_config.gni
index 46f7d7590e6dc0af6583d9958e15a0b803fe0e70..378863e95510d08244dcebb27ccb4b9e527a84c7 100644
--- a/build/config/linux/pkg_config.gni
+++ b/build/config/linux/pkg_config.gni
@@ -24,6 +24,15 @@ import("//build/config/sysroot.gni")
# when doing manual dynamic linking), set:
# ignore_libs = true
+declare_args() {
+ # A pkg-config wrapper to call instead of trying to find and call the right
+ # pkg-config directly. Wrappers like this are common in cross-compilation
+ # environments.
+ # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
+ # the sysroot mechanism to find the right .pc files.
+ pkg_config = ""
+}
+
template("pkg_config") {
assert(defined(invoker.packages),
"Variable |packages| must be defined to be a list in pkg_config.")
@@ -31,6 +40,8 @@ template("pkg_config") {
if (sysroot != "") {
# Pass the sysroot if we're using one (it requires the CPU arch also).
args = ["-s", sysroot, "-a", cpu_arch] + invoker.packages
+ } else if (pkg_config != "") {
+ args = ["-p", pkg_config] + invoker.packages
} else {
args = invoker.packages
}
« no previous file with comments | « build/config/linux/pkg-config.py ('k') | build/toolchain/cros/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698