diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-26 16:37:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-26 16:37:16 +0200 |
commit | f0edc0e2b67fa43c4e2410c7d3d8f1841d576749 (patch) | |
tree | 25ca1dd8c20649a1a9a35355670a1f5c8b99695c /build2/cc/init.cxx | |
parent | e347540d400c552917ca7067c4571f1028f6e1af (diff) |
Add pkg-config support for import installed
Redesign library importing/exporting while at it.
Diffstat (limited to 'build2/cc/init.cxx')
-rw-r--r-- | build2/cc/init.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
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<string> ("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<bool> (b["pkgconfig.config.loaded"])) + { + // Prepare configuration hints. + // + variable_map h; + h.assign ("config.pkgconfig.target") = cast<string> (r["cc.target"]); + + load_module ("pkgconfig.config", r, r, loc, true, h); + } + return true; } |