- string basename=(*i)[-1];
- string ext=Path::splitext(basename).ext;
- if((ext==".cpp" || ext==".c") && build_exe)
- {
- SourceFile *src=new SourceFile(builder, this, i->str());
-
- // Compile sources
- ObjectFile *obj=new ObjectFile(builder, *this, *src);
- objs.push_back(obj);
- }
- else if(ext==".h")
- {
- Target *hdr=builder.get_target(i->str());
- if(!hdr)
- hdr=new Header(builder, this, i->str());
-
- // Install headers if requested
- if(!install_headers.empty())
- inst_tgts.push_back(hdr);
- }
+ FS::Path subdir = FS::dirname(FS::relative(path, gen_dir));
+ binfo.local_incpath.push_back(package.get_source_directory()/subdir);