final_build_info.update_from(build_info);
build_info = final_build_info;
+ for(UseList::const_iterator i=uses.begin(); i!=uses.end(); ++i)
+ {
+ /* Select an include path that contains all the sources for this and the
+ used component. This should produce a sensible result in most cases. */
+ FS::Path base;
+ for(SourceList::const_iterator j=sources.begin(); j!=sources.end(); ++j)
+ base = base.empty() ? *j : FS::common_ancestor(base, *j);
+ const SourceList &use_sources = (*i)->get_sources();
+ for(SourceList::const_iterator j=use_sources.begin(); j!=use_sources.end(); ++j)
+ base = FS::common_ancestor(base, *j);
+ build_info.incpath.push_back(base);
+ }
+
if(type==LIBRARY || type==MODULE)
if(build_info.libmode<BuildInfo::DYNAMIC)
build_info.libmode = BuildInfo::DYNAMIC;