]> git.tdb.fi Git - builder.git/blob - source/executable.cpp
Fix recognition of versioned msp package directories
[builder.git] / source / executable.cpp
1 #include "builder.h"
2 #include "component.h"
3 #include "executable.h"
4 #include "sourcepackage.h"
5
6 using namespace std;
7 using namespace Msp;
8
9 Executable::Executable(Builder &b, const FS::Path &p):
10         Binary(b, p)
11 { }
12
13 Executable::Executable(Builder &b, const Component &c, const list<ObjectFile *> &objs):
14         Binary(b, c, generate_filename(c), objs)
15 {
16         install_location = "bin";
17 }
18
19 string Executable::generate_filename(const Component &comp)
20 {
21         const Architecture &arch = comp.get_package().get_builder().get_current_arch();
22         return arch.get_executable_patterns().front().apply(comp.get_name());
23 }