diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-09-04 16:10:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-09-04 16:14:08 +0200 |
commit | 3fd36c27e9455dae10ed4f569ca4362219bbcbcb (patch) | |
tree | 8dd42450651d18fbe463001f19ed04f2ed66d180 /build2/cc/install-rule.cxx | |
parent | 5007870b52aa549971824959a55ad3bb886f09e0 (diff) |
Initial work on binless (binary-less aka header-only) library support
Diffstat (limited to 'build2/cc/install-rule.cxx')
-rw-r--r-- | build2/cc/install-rule.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/build2/cc/install-rule.cxx b/build2/cc/install-rule.cxx index d687903..b2b508e 100644 --- a/build2/cc/install-rule.cxx +++ b/build2/cc/install-rule.cxx @@ -174,7 +174,7 @@ namespace build2 else // install or uninstall { // Derive shared library paths and cache them in the target's aux - // storage if we are un/installing (used in *_extra() functions + // storage if we are un/installing (used in the *_extra() functions // below). // static_assert (sizeof (link_rule::libs_paths) <= target::data_size, @@ -183,12 +183,15 @@ namespace build2 file* f; if ((f = t.is_a<libs> ()) != nullptr && tclass != "windows") { - const string* p (cast_null<string> (t["bin.lib.prefix"])); - const string* s (cast_null<string> (t["bin.lib.suffix"])); - t.data ( - link_.derive_libs_paths (*f, - p != nullptr ? p->c_str (): nullptr, - s != nullptr ? s->c_str (): nullptr)); + if (!f->path ().empty ()) // Not binless. + { + const string* p (cast_null<string> (t["bin.lib.prefix"])); + const string* s (cast_null<string> (t["bin.lib.suffix"])); + t.data ( + link_.derive_libs_paths (*f, + p != nullptr ? p->c_str (): nullptr, + s != nullptr ? s->c_str (): nullptr)); + } } } |