This repository has been archived by the owner on Mar 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
conanfile.py
54 lines (44 loc) · 1.54 KB
/
conanfile.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
46
47
48
49
50
51
52
53
54
from conans import ConanFile, python_requires, CMake
conan_tools = python_requires("conan-tools/[>=1.0.0]@includeos/stable")
class MenderConan(ConanFile):
settings= "os","arch","build_type","compiler"
name = "mender"
version = conan_tools.git_get_semver()
license = 'Apache-2.0'
description = 'Run your application with zero overhead'
generators = 'cmake'
url = "http://www.includeos.org/"
scm = {
"type" : "git",
"url" : "auto",
"subfolder": ".",
"revision" : "auto"
}
no_copy_source=True
default_user="includeos"
default_channel="latest"
def requirements(self):
self.requires("includeos/[>=0.14.0,include_prerelease=True]@{}/{}".format(self.user,self.channel))
self.requires("liveupdate/[>=0.13.0,include_prerelease=True]@{}/{}".format(self.user,self.channel))
def _arch(self):
return {
"x86":"i686",
"x86_64":"x86_64",
"armv8" : "aarch64"
}.get(str(self.settings.arch))
def _cmake_configure(self):
cmake = CMake(self)
cmake.definitions['ARCH']=self._arch()
cmake.configure(source_folder=self.source_folder)
return cmake
def build(self):
cmake = self._cmake_configure()
cmake.build()
def package(self):
cmake = self._cmake_configure()
cmake.install()
def package_info(self):
self.cpp_info.libs=['mender']
def deploy(self):
self.copy("*.a",dst="lib",src="lib")
self.copy("*",dst="include",src="include")