-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconanfile.py
64 lines (50 loc) · 1.92 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
from conans import ConanFile, CMake, tools
class AlephConan(ConanFile):
name = "Aleph"
version = "0.1.0"
license = "MIT"
author = "Bastian Rieck <[email protected]>"
url = "https://github.com/Pseudomanifold/Aleph"
description = "A library for exploring persistent homology"
topics = ("persistent-homology", "topological-data-analysis", "tda")
settings = "os", "compiler", "build_type", "arch"
options = {
"enable_rapidjson": [True, False],
"enable_pybind11": [True, False],
"enable_eigen3": [True, False],
"enable_tinyxml2": [True, False]
}
default_options = {
"enable_rapidjson=False",
"enable_pybind11=False",
"enable_eigen3=False",
"enable_tinyxml2=False"
}
generators = "cmake"
def requirements(self):
self.requires("boost/[>1.55]@conan/stable")
if self.options.enable_rapidjson:
self.requires("rapidjson/[>1.0]@bincrafters/stable")
# FIXME: version is not optimal
if self.options.enable_pybind:
self.requires("pybind11/2.2.4@conan/stable")
# FIXME: version is not optimal
if self.options.enable_eigen:
self.requires("eigen/3.3.5@conan/stable")
# FIXME: version is not optimal
if self.options.enable_tinyxml2:
self.requires("tinyxml2/7.0.1@nicolastagliani/stable")
def source(self):
self.run("git clone https://github.com/Pseudomanifold/Aleph.git")
self.run("cd Aleph")
def build(self):
cmake = CMake(self)
cmake.configure(source_folder="Aleph")
cmake.build()
def package(self):
self.copy("*.hh", dst="include", src="Aleph")
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.dylib", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["hello"]