-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconanfile.py
More file actions
53 lines (44 loc) · 1.47 KB
/
conanfile.py
File metadata and controls
53 lines (44 loc) · 1.47 KB
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 conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import copy
class H5CppCompilerConan(ConanFile):
name = "h5cpp-compiler"
version = "1.12.6"
package_type = "application"
settings = "os", "compiler", "build_type", "arch"
exports_sources = (
"CMakeLists.txt",
"src/*",
"cmake/*",
"h5cpp.1",
"COPYRIGHT*",
"COPYRIGHT.txt",
)
def layout(self):
cmake_layout(self)
def requirements(self):
# h5cpp-compiler is compatible with LLVM 18+, 19+, and 20.
# ConanCenter currently provides llvm-core at 19.1.7.
self.requires("llvm-core/19.1.7")
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.bindirs = ["bin"]
self.cpp_info.libdirs = []
self.cpp_info.includedirs = []
def package_id(self):
# For a build-time tool, compiler and build_type do not affect the
# package ID in a meaningful way for consumers that use it as a
# tool_requires. Clearing them keeps the package ID stable.
del self.info.settings.compiler
del self.info.settings.build_type