]> git.tdb.fi Git - builder.git/commitdiff
Don't append library version to the end of the filename on Windows
authorMikko Rasa <tdb@tdb.fi>
Wed, 5 Sep 2012 17:08:12 +0000 (20:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 5 Sep 2012 17:08:12 +0000 (20:08 +0300)
source/sharedlibrary.cpp

index 5fcbe74aa42a6a632d79303557e4bceb767e8abd..b1ad358fdbc675a3113333a6eaae5bcbcfd8f921 100644 (file)
@@ -32,7 +32,13 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
                        if(version[i]=='.' && ++dots>=2)
                                break;
 
-               soname = format("%s.%s", FS::basename(path), version.substr(0, i));
+               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.substr(0, i)));
+               else
+                       soname = format("%s.%s", pattern.apply(component->get_name()), version.substr(0, i));
+
                install_filename = soname;
        }
 }