$NetBSD$

On non-Linux platforms, remove V4L2 video capture sources and add
the null stub implementation instead, since video_capture_factory.cc
references VideoCaptureImpl::Create and CreateDeviceInfo which are
defined in video_capture_linux.cc (which needs linux/videodev2.h).

--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -2480,6 +2480,18 @@
     )
 endif()

+
+if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    remove_target_sources(tg_owt ${webrtc_loc}
+        modules/video_capture/linux/device_info_linux.cc
+        modules/video_capture/linux/device_info_v4l2.cc
+        modules/video_capture/linux/device_info_v4l2.h
+        modules/video_capture/linux/video_capture_linux.cc
+        modules/video_capture/linux/video_capture_v4l2.cc
+        modules/video_capture/linux/video_capture_v4l2.h
+    )
+    target_sources(tg_owt PRIVATE ${webrtc_loc}/modules/video_capture/video_capture_factory_null.cc)
+endif()
 if (NOT TG_OWT_BUILD_AUDIO_BACKENDS)
     remove_target_sources(tg_owt ${webrtc_loc}
         modules/audio_device/include/audio_device_factory.cc
