build: Remove libv4l2 dependency from meson

We use the linux/v4l2-common.h header to access v4l devices, not libv4l from v4l-utils.
This commit is contained in:
Christoph Haag 2020-08-26 22:51:49 +02:00 committed by Jakob Bornecrantz
parent 3f197eeffd
commit cde94cc8a2
5 changed files with 5 additions and 9 deletions

View file

@ -151,7 +151,8 @@ endif
openhmd = dependency('openhmd', required: openhmd_required)
hidapi = dependency('hidapi-libusb', required: hidapi_required)
v4l2 = dependency('libv4l2', required: v4l2_required)
has_v4l2_header = cc.has_header('linux/v4l2-common.h')
if openhmd.found() and ('auto' in drivers or 'ohmd' in drivers)
if 'ohmd' not in drivers
@ -177,7 +178,7 @@ if rs.found() and ('auto' in drivers or 'rs' in drivers)
endif
endif
if v4l2.found() and ('auto' in drivers or 'v4l2' in drivers)
if has_v4l2_header and ('auto' in drivers or 'v4l2' in drivers)
if 'v4l2' not in drivers
drivers += ['v4l2']
endif

View file

@ -113,7 +113,7 @@ lib_drv_v4l2 = static_library(
'v4l2/v4l2_driver.c',
),
include_directories: xrt_include,
dependencies: [aux, v4l2],
dependencies: [aux],
build_by_default: 'v4l2' in drivers,
)

View file

@ -65,7 +65,7 @@ if sdl2.found()
have_conf.set('XRT_HAVE_SDL2', true)
endif
if v4l2.found() and 'v4l2' in drivers
if has_v4l2_header and 'v4l2' in drivers
have_conf.set('XRT_HAVE_V4L2', true)
endif

View file

@ -27,10 +27,6 @@ if libuvc.found()
prober_deps += [libuvc]
endif
if v4l2.found()
prober_deps += [v4l2]
endif
lib_st_prober = static_library(
'st_prober',
files(prober_sources),

View file

@ -47,7 +47,6 @@ endif
if 'v4l2' in drivers
driver_libs += [lib_drv_v4l2]
driver_deps += [v4l2]
endif
if 'vive' in drivers