mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-05 13:28:16 +00:00
cmake: Fix v4l2 flag not being set
This commit is contained in:
parent
c6e6ba7485
commit
76d6133142
|
@ -97,6 +97,10 @@ if(BUILD_WITH_LIBUDEV)
|
|||
add_definitions(-DXRT_HAVE_LIBUDEV)
|
||||
endif()
|
||||
|
||||
if(BUILD_DRIVER_V4L2)
|
||||
add_definitions(-DXRT_HAVE_V4L2)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITH_LIBUSB)
|
||||
add_definitions(-DXRT_HAVE_LIBUSB)
|
||||
endif()
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "util/u_debug.h"
|
||||
#include "p_prober.h"
|
||||
|
||||
#ifdef XRT_OS_LINUX
|
||||
#ifdef XRT_HAVE_V4L2
|
||||
#include "v4l2/v4l2_interface.h"
|
||||
#endif
|
||||
|
||||
|
@ -673,7 +673,7 @@ open_video_device(struct xrt_prober *xp,
|
|||
{
|
||||
struct prober_device *pdev = (struct prober_device *)xpdev;
|
||||
|
||||
#if defined(XRT_OS_LINUX) && defined(XRT_HAVE_V4L2)
|
||||
#if defined(XRT_HAVE_V4L2)
|
||||
if (pdev->num_v4ls == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue