forked from labviros/is-robot-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
53 lines (46 loc) · 1.73 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
from conans import ConanFile, CMake, tools
class IsRobotControllerServiceConan(ConanFile):
name = "is-robot-controller"
version = "0.0.3"
license = "MIT"
url = "https://github.com/labviros/is-robot-controller"
description = ""
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
"fPIC": [True, False],
"build_tests": [True, False],
}
default_options = "shared=False", "fPIC=True", "build_tests=False"
generators = "cmake", "cmake_find_package", "cmake_paths", "virtualrunenv"
requires = (
"is-msgs/1.1.10@is/stable",
"is-wire/1.1.4@is/stable",
"eigen/3.3.5@conan/stable",
)
exports_sources = "*"
def build_requirements(self):
if self.options.build_tests:
self.build_requires("gtest/1.8.0@bincrafters/stable")
def configure(self):
self.options["is-msgs"].shared = False
self.options["is-wire"].shared = False
self.options["boost"].shared = False
self.options["protobuf"].shared = False
self.options["SimpleAmqpClient"].shared = False
self.options["rabbitmq-c"].shared = False
self.options["opentracing-cpp"].shared = False
self.options["prometheus-cpp"].shared = False
self.options["fmt"].shared = False
self.options["zlib"].shared = False
def build(self):
cmake = CMake(self, generator='Ninja')
cmake.definitions[
"CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.fPIC
cmake.definitions["enable_tests"] = self.options.build_tests
cmake.configure()
cmake.build()
# if self.options.build_tests:
# cmake.test()
def package_info(self):
pass