X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinarypackage.cpp;h=5415f257ef180cf17953e525123a9119e5168a03;hb=58727f8fb2a4840b3170806bb87a058b03194e12;hp=679fb636132127ab39195a101e2ce93204277d2a;hpb=21ca3e98081c0dc0430d8e5301591aa71ec4fca2;p=builder.git diff --git a/source/binarypackage.cpp b/source/binarypackage.cpp index 679fb63..5415f25 100644 --- a/source/binarypackage.cpp +++ b/source/binarypackage.cpp @@ -4,6 +4,7 @@ #include "binarypackage.h" #include "builder.h" #include "filetarget.h" +#include "staticlibrary.h" using namespace std; using namespace Msp; @@ -99,17 +100,15 @@ void BinaryPackage::do_prepare() BuildInfo::PathList combined_libpath = static_binfo.libpath; combined_libpath.insert(combined_libpath.end(), export_binfo.libpath.begin(), export_binfo.libpath.end()); - Target::Dependencies static_dep_libs; - for(BuildInfo::WordList::const_iterator i=static_binfo.libs.begin(); i!=static_binfo.libs.end(); ++i) - if(Target *lib = builder.get_vfs().find_library(*i, combined_libpath, BuildInfo::STATIC, system)) - static_dep_libs.push_back(lib); - for(BuildInfo::WordList::const_iterator i=export_binfo.libs.begin(); i!=export_binfo.libs.end(); ++i) if(Target *lib = builder.get_vfs().find_library(*i, export_binfo.libpath, BuildInfo::FORCE_STATIC, system)) - { - for(Target::Dependencies::const_iterator j=static_dep_libs.begin(); j!=static_dep_libs.end(); ++j) - lib->add_transitive_dependency(**j); - } + if(StaticLibrary *stlib = dynamic_cast(lib)) + { + for(BuildInfo::WordList::const_iterator j=static_binfo.libs.begin(); j!=static_binfo.libs.end(); ++j) + stlib->add_required_library(*j); + for(BuildInfo::PathList::const_iterator j=combined_libpath.begin(); j!=combined_libpath.end(); ++j) + stlib->add_library_path(*j); + } } }