From 1dc3b7357db363c51e449adf0a3779924fb13e01 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Sep 2019 13:32:07 +0200 Subject: Add support for native shared library versioning on Linux Now we can do: lib{foo}: bin.lib.version = linux@1.2 And end up with libfoo.so.1.2 libfoo.so.1 -> libfoo.so.1.2 --- libbuild2/target.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libbuild2/target.cxx') diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 22f5e66..e4218ed 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -659,7 +659,7 @@ namespace build2 } const path& path_target:: - derive_path (const char* de, const char* np, const char* ns) + derive_path (const char* de, const char* np, const char* ns, const char* ee) { path_type p (dir); @@ -674,11 +674,11 @@ namespace build2 if (ns != nullptr) p += ns; - return derive_path (move (p), de); + return derive_path (move (p), de, ee); } const path& path_target:: - derive_path (path_type p, const char* de) + derive_path (path_type p, const char* de, const char* ee) { // Derive and add the extension if any. // @@ -692,6 +692,12 @@ namespace build2 } } + if (ee != nullptr) + { + p += '.'; + p += ee; + } + path (move (p)); return path_; } -- cgit v1.1