forked from bincrafters/conan-android_ndk_installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.py
45 lines (39 loc) · 1.37 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bincrafters import build_template_default
import platform
import os
if __name__ == "__main__":
builder = build_template_default.get_builder()
builder.builds = []
settings = dict()
settings['compiler'] = 'clang'
settings['compiler.version'] = '8'
settings['compiler.libcxx'] = 'libc++'
settings['os'] = 'Android'
if platform.system() == 'Windows':
settings['os_build'] = 'Windows'
if 'ARCH_BUILD' in os.environ:
arches_build = [os.environ['ARCH_BUILD']]
else:
arches_build = ['x86', 'x86_64']
elif platform.system() == 'Linux':
settings['os_build'] = 'Linux'
arches_build = ['x86_64']
elif platform.system() == 'Darwin':
settings['os_build'] = 'Macos'
arches_build = ['x86_64']
if 'ARCH' in os.environ:
arches = [os.environ['ARCH']]
else:
arches = ['x86', 'x86_64', 'armv7', 'armv8']
for arch in arches:
for arch_build in arches_build:
settings['arch'] = arch
settings['arch_build'] = arch_build
if arch in ['x86', 'armv7']:
settings['os.api_level'] = '16'
else:
settings['os.api_level'] = '21'
builder.add(settings=settings.copy(), options={}, env_vars={}, build_requires={})
builder.run()