-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconanfile.py
70 lines (60 loc) · 2.06 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from conans import ConanFile, python_requires, CMake
conan_tools = python_requires("conan-tools/[>=1.0.0]@includeos/stable")
class UplinkConan(ConanFile):
settings= "os","arch","build_type","compiler"
name = "uplink"
license = 'Apache-2.0'
version = conan_tools.git_get_semver()
description = 'Run your application with zero overhead'
generators = 'cmake','virtualenv'
url = "http://www.includeos.org/"
scm = {
"type" : "git",
"url" : "auto",
"subfolder": ".",
"revision" : "auto"
}
default_user="includeos"
default_channel="test"
options={
"liveupdate":[True,False],
"tls": [True,False],
"uplink_log": [True,False]
}
default_options={
"liveupdate":True,
"tls":True,
"uplink_log":True
}
no_copy_source=True
def package_id(self):
self.info.requires.major_mode()
def requirements(self):
self.requires("includeos/[>=0.14.0,include_prerelease=True]@includeos/latest")
if (self.options.liveupdate):
self.requires("liveupdate/[>=0.14.0,include_prerelease=True]@includeos/latest")
def _cmake_configure(self):
cmake = CMake(self)
cmake.definitions['UPLINK_LOG']=self.options.uplink_log
cmake.definitions['LIVEUPDATE']=self.options.liveupdate
cmake.definitions['TLS']=self.options.tls
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.libdirs = [
'drivers'
]
self.cpp_info.libs=['uplink']
if self.options.uplink_log:
self.cpp_info.libdirs.append('plugins')
self.cpp_info.libs.append('uplink_log')
def deploy(self):
self.copy("*.a",dst="drivers",src="drivers")
self.copy("*.a",dst="plugins",src="plugins")
self.copy("*",dst="include",src="include")