]> git.tdb.fi Git - builder.git/commitdiff
Don't use soname for modules
authorMikko Rasa <tdb@tdb.fi>
Sun, 5 Oct 2014 23:59:28 +0000 (02:59 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 5 Oct 2014 23:59:28 +0000 (02:59 +0300)
source/sharedlibrary.cpp

index 305061a02c5bd7c617ad8c4b8febb57d4ddd8197..6600b740332a23dff7a882a0a63e6c99afcbd8ec 100644 (file)
@@ -27,27 +27,30 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
                install_location = "bin";
        else
                install_location = "lib";
+
        if(component->get_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<ObjectFile *>::const_iterator i=objects.begin(); i!=objects.end(); ++i)