Commit 76d61331 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz

cmake: Fix v4l2 flag not being set

parent c6e6ba74
Pipeline #77691 passed with stages
in 2 minutes and 14 seconds
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment