-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
54 lines (47 loc) · 1.91 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
from conans import ConanFile, CMake, tools
from conans.util import files
import yaml
class Bcm2837Conan(ConanFile):
name = "bcm2837"
version = str(yaml.load(tools.load("settings.yml"))['project']['version'])
license = "MIT"
url = "[email protected]:socs/broadcom/bcm2837.git"
description = "BCM2837"
settings = "cppstd", "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [
True, False], "fPIE": [True, False]}
default_options = "shared=False", "fPIC=False", "fPIE=False"
generators = "cmake"
exports = "settings.yml"
exports_sources = "src/*", "CMakeLists.txt"
requires = "gtest/1.8.0@hiventive/stable", \
"communication/0.1.1@hiventive/testing", \
"pl011/0.1.1@hiventive/testing", \
"bcm2836-control/0.1.0@hiventive/testing", \
"bcm2835-armctrl-ic/0.2.0@hiventive/testing", \
"memory/0.1.0@hiventive/testing", \
"bcm2835-gpio/0.2.0@hiventive/testing", \
"button/0.1.0@hiventive/testing", \
"led/0.1.0@hiventive/testing", \
"uart-backend/0.1.0@hiventive/testing", \
"button-backend/0.1.0@hiventive/testing", \
"led-backend/0.1.0@hiventive/testing", \
"qmg2sc/0.6.0@hiventive/testing"
def configure(self):
self.options["qmg2sc"].target_aarch64 = True
def _configure_cmake(self):
cmake = CMake(self)
if self.settings.os != "Windows":
cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.fPIC or self.options.fPIE
return cmake
def build(self):
cmake = self._configure_cmake()
cmake.configure()
cmake.build()
def package(self):
cmake = self._configure_cmake()
cmake.install()
self.copy("*.h", dst="include", src="src")
self.copy("*.hpp", dst="include", src="src")
def package_info(self):
self.cpp_info.libs = ["bcm2837"]