diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-04 13:32:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-04 15:36:56 +0200 |
commit | 1dc3b7357db363c51e449adf0a3779924fb13e01 (patch) | |
tree | 88d53506c672aa5a1d3c5417a02038a6b52c33dc /libbuild2/target.cxx | |
parent | ddb7dbbb37475d77e53e813472f9e28d05195714 (diff) |
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
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r-- | libbuild2/target.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
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_; } |