Skip to content
Snippets Groups Projects
Commit 8acc4b3b authored by Patrick MADELA's avatar Patrick MADELA
Browse files

Use new approach based on python requires and fix versions differences (conan, maven, tags)

parent 184c307b
No related branches found
No related tags found
No related merge requests found
from conan import ConanFile from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
class ActuatorSystemRecipe(ConanFile): class ActuatorSystemRecipe(ConanFile):
name = "actuatorsystem" name = "actuatorsystem"
...@@ -8,6 +6,8 @@ class ActuatorSystemRecipe(ConanFile): ...@@ -8,6 +6,8 @@ class ActuatorSystemRecipe(ConanFile):
version = "1.0.7" version = "1.0.7"
package_type = "application" package_type = "application"
user = "soleil" user = "soleil"
python_requires = "base/[>=1.0]@soleil/stable"
python_requires_extend = "base.Device"
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
author = "Falilou Thiam" author = "Falilou Thiam"
...@@ -24,27 +24,3 @@ class ActuatorSystemRecipe(ConanFile): ...@@ -24,27 +24,3 @@ class ActuatorSystemRecipe(ConanFile):
if self.settings.os == "Linux": if self.settings.os == "Linux":
self.requires("crashreporting2/[>=1.0]@soleil/stable") self.requires("crashreporting2/[>=1.0]@soleil/stable")
\ No newline at end of file
def layout(self):
cmake_layout(self)
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
major, minor, patch = map(int, self.version.split('.'))
tc.variables["PROJECT_NAME"] = self.name
tc.variables["PROJECT_VERSION"] = self.version
tc.variables["EXECUTABLE_NAME"] = self.executable
tc.variables["MAJOR_VERSION"] = major
tc.variables["MINOR_VERSION"] = minor
tc.variables["PATCH_VERSION"] = patch
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment