]> git.tdb.fi Git - builder.git/blob - source/androidmanifestfile.cpp
Replace some sets with vectors as well
[builder.git] / source / androidmanifestfile.cpp
1 #include <msp/core/algorithm.h>
2 #include "androidapplicationcomponent.h"
3 #include "androidmanifestfile.h"
4 #include "builder.h"
5 #include "sourcepackage.h"
6
7 using namespace std;
8 using namespace Msp;
9
10 AndroidManifestFile::AndroidManifestFile(Builder &b, const AndroidApplicationComponent &a):
11         FileTarget(b, a.get_package(), a.get_package().get_temp_directory()/a.get_name()/"AndroidManifest.xml"),
12         native_lib(0)
13 {
14         component = &a;
15         tool = &builder.get_toolchain().get_tool("AMG");
16
17         add_dependency(package->get_build_file());
18 }
19
20 void AndroidManifestFile::set_native_library(SharedLibrary *lib)
21 {
22         native_lib = lib;
23 }
24
25 void AndroidManifestFile::set_orientation(const string &ori)
26 {
27         orientation = ori;
28 }
29
30 void AndroidManifestFile::add_permission(const string &perm)
31 {
32         if(!any_equals(permissions, perm))
33                 permissions.push_back(perm);
34 }