-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
46 lines (38 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
from conans import ConanFile, CMake, tools
class Sym2Conan(ConanFile):
name = "sym2"
version = "0.0.0"
license = "Apache License 2.0"
author = "Lukas Böger <[email protected]>"
url = "https://git.sr.ht/~lubgr/sym2"
description = "Fast, tiny symbolic library"
topics = ("cas", "computer algebra")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = "cmake"
def build_requirements(self):
self.build_requires("chibi-scheme/0.10-1ba5df1@sym2/develop")
self.build_requires("boost-headers/1.81.0@sym2/stable")
self.build_requires("doctest/2.4.11@sym2/stable")
self.build_requires("cmake-coverage/03be0c7@sym2/develop")
self.build_requires("benchmark/1.7.1@sym2/stable")
self.build_requires("ginac/1.8.6@sym2/stable")
def source(self):
git = tools.Git("src")
git.clone(url="https://git.sr.ht:~lubgr/sym2")
def build(self):
cmake = CMake(self)
cmake.configure(source_folder=".")
cmake.build()
def package(self):
self.copy("*.h", dst="include", src="include")
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 imports(self):
self.copy("lib/*", root_package="chibi-scheme", dst="scheme", excludes=["lib/cmake", "lib/pkgconfig"])
self.copy("share/*", root_package="chibi-scheme", dst="scheme", excludes="share/man")
self.copy("bin/chibi-scheme", dst="scheme", root_package="chibi-scheme")
def package_info(self):
self.cpp_info.libs = ["sym2"]