]> git.tdb.fi Git - builder.git/blob - source/androidresourcefile.cpp
Refactor transitive dependencies to work on all targets
[builder.git] / source / androidresourcefile.cpp
1 #include <msp/fs/utils.h>
2 #include "androidresourcefile.h"
3 #include "component.h"
4
5 using namespace std;
6 using namespace Msp;
7
8 AndroidResourceFile::AndroidResourceFile(Builder &b, const Component &c, const FS::Path &p):
9         FileTarget(b, c.get_package(), p)
10 {
11         string ext = FS::extpart(FS::basename(p));
12         if(ext==".png" || ext==".jpg")
13                 resource_type = "drawable";
14         // TODO recognize various xml files; must inspect contents
15         else
16                 resource_type = "raw";
17
18         install_location = "res/"+resource_type;
19 }