-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
36 lines (28 loc) · 938 Bytes
/
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
from conan import ConanFile
from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout
from conan.tools.build import check_min_cppstd
class UsageConan(ConanFile):
name = "usage"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
exports_sources = "CMakeLists.txt", "src/*", "include/*"
def validate(self):
if self.info.settings.compiler.cppstd:
check_min_cppstd(self, "20")
def requirements(self):
self.requires("cppfront/cci.20221024")
def layout(self):
cmake_layout(self)
def generate(self):
tc = CMakeToolchain(self)
# tc.variables["CMAKE_VERBOSE_MAKEFILE"] = True
tc.generate()
tc = CMakeDeps(self)
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()