]> git.tdb.fi Git - builder.git/commitdiff
Remove a lib prefix from the libname of built SharedLibraries
authorMikko Rasa <tdb@tdb.fi>
Wed, 28 Dec 2022 11:23:46 +0000 (13:23 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 28 Dec 2022 14:11:05 +0000 (16:11 +0200)
It may be useful to have the prefix in a library component name to
differentiate it from a program component.

source/lib/sharedlibrary.cpp

index 0673a05e09b61b76ba9befbfe61a52bfe635af3c..dab6b8df8e70635231e6393bef172f1594eb5b33 100644 (file)
@@ -22,6 +22,9 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const vector<Object
        libname(c.get_name()),
        import_lib(0)
 {
+       if(!libname.compare(0, 3, "lib"))
+               libname = libname.substr(3);
+
        if(builder.get_current_arch().get_system()=="windows")
                install_location = "bin";
        else