-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
57 lines (45 loc) · 1.9 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
47
48
49
50
51
52
53
54
55
56
57
import os
from os.path import join
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.files import copy
from conan.tools.scm import Git
class EQMSoftwareRecipe(ConanFile):
name = "obc-eqm-sw"
version = "1.0"
revision_mode = "scm"
# Optional metadata
license = "MIT"
author = "SpaceDot - AcubeSAT, [email protected]"
url = "https://github.com/PeakSat/OBC-EQM-Software"
description = "EQM Software for OBCcampaign test"
topics = ("satellite", "peaksat", "obc", "obc-software")
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": False, "ecss-services/*:ecss_config_file_path": os.path.abspath("inc/Platform/")}
# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "CMakeLists.txt", "src/*", "inc/*", "lib/*"
generators = "CMakeDeps"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def source(self):
git = Git(self)
git.clone(url="[email protected]:cmcqueen/cobs-c.git", target=join(str(self.source_folder), "lib/cobs-c"))
git = Git(self)
git.clone(url="https://gitlab.com/acubesat/obc/atsam-component-drivers.git", target=join(str(self.source_folder), "lib/atsam-component-drivers"))
self.run("cd lib/atsam-component-drivers && git checkout f0d5efdd")
def layout(self):
cmake_layout(self)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def requirements(self):
self.requires("etl/20.37.2")
self.requires("logger/1.0")
self.requires("ecss-services/0.9")