From: Mikko Rasa Date: Tue, 28 May 2013 12:23:35 +0000 (+0300) Subject: Hacky support for OS X frameworks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f182274c67f6e22cef57df560d33cd180a72f167;p=builder.git Hacky support for OS X frameworks This isn't very elegant, but I need more time to come up with a proper implementation. --- diff --git a/source/binary.cpp b/source/binary.cpp index a3f3c9b..b3b882d 100644 --- a/source/binary.cpp +++ b/source/binary.cpp @@ -43,6 +43,9 @@ void Binary::find_dependencies() const BuildInfo &binfo = c->get_build_info(); for(BuildInfo::WordList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i) { + if(i->size()>10 && !i->compare(i->size()-10, 10, ".framework")) + continue; + BuildInfo::LibraryMode libmode = component->get_build_info().get_libmode_for(*i); Target *lib = builder.get_vfs().find_library(*i, binfo.libpath, libmode); if(lib) diff --git a/source/gnulinker.cpp b/source/gnulinker.cpp index b2516d6..a56d716 100644 --- a/source/gnulinker.cpp +++ b/source/gnulinker.cpp @@ -246,6 +246,13 @@ Task *GnuLinker::Linker::run(const Target &target) const } } + for(BuildInfo::WordList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i) + if(i->size()>10 && !i->compare(i->size()-10, 10, ".framework")) + { + argv.push_back("-framework"); + argv.push_back(i->substr(0, i->size()-10)); + } + if(need_l_objc) argv.push_back("-lobjc"); if(static_link_ok)