From ec0d6014aa2db4a02588c9027e7dba17507df364 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 6 Oct 2014 02:59:28 +0300 Subject: [PATCH] Don't use soname for modules --- source/sharedlibrary.cpp | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/source/sharedlibrary.cpp b/source/sharedlibrary.cpp index 305061a..6600b74 100644 --- a/source/sharedlibrary.cpp +++ b/source/sharedlibrary.cpp @@ -27,27 +27,30 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const listget_type()==Component::MODULE) install_location /= package->get_name(); - - const string &version = component->get_package().get_interface_version(); - if(!version.empty()) + else { - const Architecture &arch = builder.get_current_arch(); - const Pattern &pattern = arch.get_shared_library_patterns().front(); - if(arch.get_system()=="windows") - soname = pattern.apply(format("%s-%s", component->get_name(), version)); - else if(arch.get_system()=="darwin") + const string &version = component->get_package().get_interface_version(); + if(!version.empty()) { - string filename = pattern.apply(component->get_name()); - string base = FS::basepart(filename); - string ext = FS::extpart(filename); - soname = format("%s.%s%s", base, version, ext); - } - else - soname = format("%s.%s", pattern.apply(component->get_name()), version); + const Architecture &arch = builder.get_current_arch(); + const Pattern &pattern = arch.get_shared_library_patterns().front(); + if(arch.get_system()=="windows") + soname = pattern.apply(format("%s-%s", component->get_name(), version)); + else if(arch.get_system()=="darwin") + { + string filename = pattern.apply(component->get_name()); + string base = FS::basepart(filename); + string ext = FS::extpart(filename); + soname = format("%s.%s%s", base, version, ext); + } + else + soname = format("%s.%s", pattern.apply(component->get_name()), version); - install_filename = soname; + install_filename = soname; + } } for(list::const_iterator i=objects.begin(); i!=objects.end(); ++i) -- 2.45.2