From 9e55ab1d39bf987d7df87a027c4331e9be309d09 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Mar 2022 10:02:40 +0200 Subject: 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. --- libbuild2/cxx/init.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/cxx/init.cxx') diff --git a/libbuild2/cxx/init.cxx b/libbuild2/cxx/init.cxx index cd5169d..106668a 100644 --- a/libbuild2/cxx/init.cxx +++ b/libbuild2/cxx/init.cxx @@ -668,6 +668,9 @@ namespace build2 vp["cc.export.libs"], vp["cc.export.impl_libs"], + vp["cc.pkconfig.include"], + vp["cc.pkconfig.lib"], + vp.insert ("cxx.stdlib"), vp["cc.runtime"], @@ -733,6 +736,9 @@ namespace build2 vp.insert_alias (d.c_module_name, "cxx.module_name"); vp.insert_alias (d.c_importable, "cxx.importable"); + vp.insert_alias (d.c_pkgconfig_include, "cxx.pkgconfig.include"); + vp.insert_alias (d.c_pkgconfig_lib, "cxx.pkgconfig.lib"); + auto& m (extra.set_module (new config_module (move (d)))); m.guess (rs, loc, extra.hints); -- cgit v1.1