]> git.tdb.fi Git - builder.git/blob - source/installcomponent.cpp
Inline simple constructors
[builder.git] / source / installcomponent.cpp
1 #include "installcomponent.h"
2 #include "builder.h"
3 #include "file.h"
4 #include "sourcepackage.h"
5 #include "tool.h"
6
7 using namespace std;
8 using namespace Msp;
9
10 void InstallComponent::create_targets() const
11 {
12         Builder &builder = package.get_builder();
13         Target *inst = builder.get_build_graph().get_target("install");
14         Tool &copy = builder.get_toolchain().get_tool("CP");
15
16         for(const FS::Path &s: collect_source_files())
17         {
18                 Target *tgt = builder.get_vfs().get_target(s);
19                 if(!tgt)
20                         tgt = new File(builder, package, s);
21                 inst->add_dependency(*copy.create_target(*tgt, name));
22         }
23 }