From f0edc0e2b67fa43c4e2410c7d3d8f1841d576749 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 Aug 2016 16:37:16 +0200 Subject: Add pkg-config support for import installed Redesign library importing/exporting while at it. --- build2/cc/init.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index 0f1fda7..066367d 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -65,6 +65,9 @@ namespace build2 // "c", "cxx"). Currenly only set for libraries and is used to decide // which *.libs to use during static linking. // + // It can also be the special "cc" value which means a C-common library + // but specific language is not known. Used in import installed logic. + // v.insert ("cc.type"); return true; @@ -228,6 +231,23 @@ namespace build2 load_module ("bin.rc.config", r, b, loc); } + // Load (optionally) the pkgconfig.config module. + // + // @@ At some point we may also want to verify that targets matched + // if it has already been loaded (by someone) else. Currently it + // doesn't set pkgconfig.target. Perhaps only set if it was used + // to derive the program name? + // + if (first && !cast_false (b["pkgconfig.config.loaded"])) + { + // Prepare configuration hints. + // + variable_map h; + h.assign ("config.pkgconfig.target") = cast (r["cc.target"]); + + load_module ("pkgconfig.config", r, r, loc, true, h); + } + return true; } -- cgit v1.1