X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsharedlibrary.cpp;h=305061a02c5bd7c617ad8c4b8febb57d4ddd8197;hb=0f7867524bf87a389ff5d4f9d3290d68a254b693;hp=06a99442b2fb47377044546d1646d7d599da5dcb;hpb=82ae60a647ebb9567f7177c353245f4d72faaf5e;p=builder.git diff --git a/source/sharedlibrary.cpp b/source/sharedlibrary.cpp index 06a9944..305061a 100644 --- a/source/sharedlibrary.cpp +++ b/source/sharedlibrary.cpp @@ -2,6 +2,7 @@ #include #include "builder.h" #include "component.h" +#include "objectfile.h" #include "sharedlibrary.h" #include "sourcepackage.h" @@ -22,7 +23,10 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const listget_type()==Component::MODULE) install_location /= package->get_name(); @@ -33,11 +37,21 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const listget_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; } + + for(list::const_iterator i=objects.begin(); i!=objects.end(); ++i) + (*i)->set_used_in_shared_library(true); } string SharedLibrary::generate_filename(const Component &comp)