Skip to content

Commit

Permalink
libcamera: Add option to configure udev support
Browse files Browse the repository at this point in the history
libcamera uses udev to support hotplug (and unplug) detection. This is
an optional feature, which gets selected automatically if udev is
available. Users may however want to build libcamera without hotplug
detection, even if udev is available on the system. Add a new feature
option to control udev support. The default value is auto, which retains
the existing behaviour.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Umang Jain <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
  • Loading branch information
pinchartl committed Jul 7, 2023
1 parent ca437b4 commit d314d3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ py_mod.find_installation('python3', modules : py_modules)
summary({
'Enabled pipelines': pipelines,
'Enabled IPA modules': enabled_ipa_names,
'Hotplug support': libudev.found(),
'Tracing support': tracing_enabled,
'Android support': android_enabled,
'GStreamer support': gst_enabled,
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ option('tracing',
value : 'auto',
description : 'Enable tracing (based on lttng)')

option('udev',
type : 'feature',
value : 'auto',
description : 'Enable udev support for hotplug')

option('v4l2',
type : 'boolean',
value : false,
Expand Down
2 changes: 1 addition & 1 deletion src/libcamera/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ libdl = null_dep
if not cc.has_function('dlopen')
libdl = cc.find_library('dl')
endif
libudev = dependency('libudev', required : false)
libudev = dependency('libudev', required : get_option('udev'))
libyaml = dependency('yaml-0.1', required : false)

# Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.
Expand Down

0 comments on commit d314d3b

Please sign in to comment.