waf: add libiio support for bebop

check for the presence of libiio to enable the compilation of
the bebop rangefinder that needs it.
If the build remains static, there needs to be a rootfs that contains
the libiio.a file because it is not included in the debian package.
A solution can be to compile libiio and copy libiio.a in /usr/lib[/arch]
This commit is contained in:
Julien Beraud 2016-04-15 19:27:43 +02:00 committed by Lucas De Marchi
parent 384ad94e73
commit 5418f71aae
2 changed files with 6 additions and 0 deletions

View File

@ -277,6 +277,11 @@ class bebop(linux):
def configure_env(self, cfg, env):
super(bebop, self).configure_env(cfg, env)
cfg.check_cfg(package='libiio', mandatory=False, global_define=True,
args = ['--libs', '--cflags'])
env.LIB += cfg.env.LIB_LIBIIO
env.DEFINES.update(
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_BEBOP',
)

View File

@ -125,6 +125,7 @@ def configure(cfg):
_filter_supported_cxx_compilers('g++', 'clang++')
cfg.env.AR = cfg.env.TOOLCHAIN + '-ar'
cfg.env.PKGCONFIG = cfg.env.TOOLCHAIN + '-pkg-config'
cfg.msg('Using toolchain', cfg.env.TOOLCHAIN)
cfg.load('compiler_cxx compiler_c')