|
1 | | -# Copyright 2024 Khalil Estell |
| 1 | +# Copyright 2024 - 2025 Khalil Estell and the libhal contributors |
2 | 2 | # |
3 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | # you may not use this file except in compliance with the License. |
@@ -82,6 +82,47 @@ def build(self): |
82 | 82 | cmake.build() |
83 | 83 |
|
84 | 84 |
|
| 85 | +class app: |
| 86 | + settings = "compiler", "build_type", "os", "arch" |
| 87 | + options = { |
| 88 | + "platform": ["ANY"], |
| 89 | + "micromod_board": ["ANY"], |
| 90 | + } |
| 91 | + default_options = { |
| 92 | + "platform": "unspecified", |
| 93 | + "micromod_board": "unspecified", |
| 94 | + } |
| 95 | + |
| 96 | + def layout(self): |
| 97 | + if "micromod" == str(self.options.platform): |
| 98 | + build_path = os.path.join("build", |
| 99 | + str(self.options.platform), |
| 100 | + str(self.options.micromod_board)) |
| 101 | + cmake_layout(self, build_folder=build_path) |
| 102 | + else: |
| 103 | + build_path = os.path.join("build", |
| 104 | + str(self.options.platform)) |
| 105 | + cmake_layout(self, build_folder=build_path) |
| 106 | + |
| 107 | + def build_requirements(self): |
| 108 | + self.tool_requires("make/4.4.1") |
| 109 | + self.tool_requires("cmake/3.27.1") |
| 110 | + self.tool_requires("libhal-cmake-util/[^4.3.3]") |
| 111 | + |
| 112 | + def generate(self): |
| 113 | + virt = VirtualBuildEnv(self) |
| 114 | + virt.generate() |
| 115 | + cmake = CMakeDeps(self) |
| 116 | + cmake.generate() |
| 117 | + tc = CMakeToolchain(self) |
| 118 | + tc.generate() |
| 119 | + |
| 120 | + def build(self): |
| 121 | + cmake = CMake(self) |
| 122 | + cmake.configure() |
| 123 | + cmake.build() |
| 124 | + |
| 125 | + |
85 | 126 | def add_library_requirements(conan_file: ConanFile, |
86 | 127 | override_libhal_version: str | None = None, |
87 | 128 | override_libhal_util_version: str | None = None): |
@@ -219,5 +260,5 @@ def test(self): |
219 | 260 |
|
220 | 261 | class libhal_bootstrap(ConanFile): |
221 | 262 | name = "libhal-bootstrap" |
222 | | - version = "4.2.1" |
| 263 | + version = "4.3.0" |
223 | 264 | package_type = "python-require" |
0 commit comments