aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/c/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-28 10:02:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-28 10:02:40 +0200
commit9e55ab1d39bf987d7df87a027c4331e9be309d09 (patch)
treed65e8c2900cae4077b4ca7b591be874c784d1382 /libbuild2/c/init.cxx
parent7d50db8924b8ce4faf05cde737bce9114df58f0d (diff)
Add ability to customize pkg-config header and library search paths
Specifically, {cc,c,cxx}.pkgconfig.{include,lib} variables specify header (-I) and library (-L) search paths to use in the generated .pc files instead of the default install.{include,lib}. Relative paths are resolved as install paths.
Diffstat (limited to 'libbuild2/c/init.cxx')
-rw-r--r--libbuild2/c/init.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx
index be001a8..6725ca7 100644
--- a/libbuild2/c/init.cxx
+++ b/libbuild2/c/init.cxx
@@ -225,6 +225,9 @@ namespace build2
vp["cc.export.libs"],
vp["cc.export.impl_libs"],
+ vp["cc.pkconfig.include"],
+ vp["cc.pkconfig.lib"],
+
vp.insert_alias (vp["cc.stdlib"], "c.stdlib"), // Same as cc.stdlib.
vp["cc.runtime"],
@@ -276,6 +279,9 @@ namespace build2
vp.insert_alias (d.c_runtime, "c.runtime");
vp.insert_alias (d.c_importable, "c.importable");
+ vp.insert_alias (d.c_pkgconfig_include, "c.pkgconfig.include");
+ vp.insert_alias (d.c_pkgconfig_lib, "c.pkgconfig.lib");
+
auto& m (extra.set_module (new config_module (move (d))));
m.guess (rs, loc, extra.hints);