X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=cf4234607e978d1f6399a2732adaded39496602d;hb=05a2b9dabd01414e9e9a91f9d69babaca4ccb32d;hp=5c1d9f6b6b6a9d3ab35d83cc1258a4921557b6d3;hpb=20994a6f4802f2dbcf01888d0e1996edf554ade5;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 5c1d9f6..cf42346 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of builder -Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions +Copyright © 2006-2010 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -22,6 +22,7 @@ Distributed under the LGPL #include "sharedlibrary.h" #include "sourcepackage.h" #include "staticlibrary.h" +#include "symlink.h" #include "tarball.h" #include "target.h" @@ -211,7 +212,14 @@ void Component::create_targets() const Target *inst_tgt = builder.get_target("install"); for(list::const_iterator i=inst_list.begin(); i!=inst_list.end(); ++i) - inst_tgt->add_depend(new Install(builder, pkg, **i, inst_loc)); + { + Install *inst = new Install(builder, pkg, **i, inst_loc); + inst_tgt->add_depend(inst); + + if(type==LIBRARY) + if(SharedLibrary *shlib = dynamic_cast(*i)) + inst_tgt->add_depend(new Symlink(builder, pkg, *inst, shlib->get_name())); + } } PathList Component::collect_source_files() const