forked from PickNikRobotics/data_tamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
74 lines (62 loc) · 1.76 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
71
72
73
74
# -*- coding: utf-8 -*-
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
class DataTamerConan(ConanFile):
name = "data_tamer"
version = "0.9.4"
package_type = "library"
url = "https://github.com/facontidavide/data_tamer"
license = "MIT"
description = "library for data profiling"
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
"fPIC": [True, False],
"tests": [True, False],
"examples": [True, False]
}
default_options = {
"shared": False,
"fPIC": True,
"tests": True,
"examples": True
}
exports_sources = (
"3rdparty/*",
"include/*",
"src/*",
"examples/*",
"tests/*",
"CMakeLists.txt",
"data_tamerConfig.cmake.in"
)
def requirements(self):
self.requires("mcap/1.3.0")
if self.options.tests:
self.requires("gtest/1.14.0")
def build_requirements(self):
self.tool_requires("cmake/3.26.4")
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
def layout(self):
cmake_layout(self)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
def build(self):
cmake = CMake(self)
cmake.configure(
{
"DATA_TAMER_BUILD_TESTS": self.options.tests,
"DATA_TAMER_BUILD_EXAMPLES": self.options.examples
}
)
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = ["data_tamer"]