-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
50 lines (40 loc) · 1.43 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
from conans import ConanFile, CMake, tools
# version MUST be supplied on command line
class ParticleFilterConan(ConanFile):
name = "particle_filter_tutorial_cpp"
scm = {
"type": "git",
"subfolder": "particle_filter",
"url": "ssh://[email protected]:7999/rapcore/particle_filter.git",
"revision": "auto"
}
license = "Proprietary"
author = "Jason Beach <[email protected]>"
description = "Particle Filter Tutorial"
topics = ("raptor")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": True, "fPIC": True}
generators = "cmake_find_package", "cmake_paths"
_cmake = None
def configure(self):
if self.settings.compiler.libcxx == "libstdc++":
raise Exception("This package is only compatible with libstdc++11")
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def build(self):
if self._cmake:
return self._cmake
self._cmake = CMake(self, generator="Ninja")
self._cmake.configure(source_folder="particle_filter",
defs={"CMAKE_TOOLCHAIN_FILE": "conan_paths.cmake"})
self._cmake.build()
def requirements(self):
self.requires('catch2/2.13.4')
self.requires('fmt/9.1.0')
self.requires('eigen/3.4.0')
def package(self):
self._cmake.install()
def package_info(self):
self.cpp_info.libs = [""]