build: Add sample driver to meson build

This commit is contained in:
Christoph Haag 2022-02-19 01:54:55 +01:00 committed by Jakob Bornecrantz
parent 86a1ba32e5
commit 5e1805f04b
2 changed files with 15 additions and 0 deletions

View file

@ -26,6 +26,7 @@ option('drivers',
'qwerty',
'ulv2',
'euroc',
'sample',
],
value: ['auto'],
description: 'Set of drivers to build')

View file

@ -348,3 +348,17 @@ lib_drv_euroc = static_library(
dependencies: [aux, opencv],
build_by_default: 'euroc' in drivers,
)
# We build the sample driver to make sure it stays valid,
# but it never gets linked into a final target (src/xrt/targets/meson.build)
lib_drv_sample = static_library(
'drv_sample',
files(
'sample/sample_hmd.c',
'sample/sample_interface.h',
'sample/sample_prober.c',
),
include_directories: [xrt_include],
dependencies: [aux],
build_by_default: 'sample' in drivers,
)