-
Notifications
You must be signed in to change notification settings - Fork 479
/
conanfile.py
45 lines (40 loc) · 1.47 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
from conans import ConanFile, CMake
import os
class BackwardCpp(ConanFile):
settings = 'os', 'compiler', 'build_type', 'arch'
name = 'backward'
url = 'https://github.com/bombela/backward-cpp'
license = 'MIT'
version = '1.3.0'
options = {
'stack_walking_unwind': [True, False],
'stack_walking_backtrace': [True, False],
'stack_details_auto_detect': [True, False],
'stack_details_backtrace_symbol': [True, False],
'stack_details_dw': [True, False],
'stack_details_bfd': [True, False],
'shared': [True, False]
}
default_options = (
'stack_walking_unwind=True',
'stack_walking_backtrace=False',
'stack_details_auto_detect=True',
'stack_details_backtrace_symbol=False',
'stack_details_dw=False',
'stack_details_bfd=False',
'shared=False'
)
exports = 'backward.cpp', 'backward.hpp', 'test/*', 'CMakeLists.txt', 'BackwardConfig.cmake'
generators = 'cmake'
def build(self):
cmake = CMake(self)
cmake.configure(defs={'BACKWARD_' + name.upper(): value for name, value in self.options.values.as_list()})
cmake.build()
def package(self):
self.copy('backward.hpp', os.path.join('include', 'backward'))
self.copy('*.a', dst='lib')
self.copy('*.so', dst='lib')
self.copy('*.lib', dst='lib')
self.copy('*.dll', dst='lib')
def package_info(self):
self.cpp_info.libs = ['backward']