libcamera: Make libudev optional
libcamera depends on libudev for device enumeration. It is however useful to allow building documentation without requiring the dependency to be installed. Make the libudev dependency optional and compile the udev-based device enumerator out when libudev is not present. Note that while libcamera will compile without libudev, it will not be able to enumerate devices. A sysfs-based device enumerator is planned as a fallback but not implemented yet. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -80,7 +80,7 @@ int CameraManager::start()
|
||||
return -EBUSY;
|
||||
|
||||
enumerator_ = DeviceEnumerator::create();
|
||||
if (enumerator_->enumerate())
|
||||
if (!enumerator_ || enumerator_->enumerate())
|
||||
return -ENODEV;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user