[libcamera-devel,2/4] src: meson: Simplify v4l2 enablement
diff mbox series

Message ID 20201207150737.307692-3-kieran.bingham@ideasonboard.com
State Accepted
Delegated to: Kieran Bingham
Headers show
Series
  • libcamera: Small meson-fixes
Related show

Commit Message

Kieran Bingham Dec. 7, 2020, 3:07 p.m. UTC
Simplify the src level meson file by moving the declaration of the v4l2 subdir
to match the other invocations, making use of 'subdir_done()' to break out if the
adaptation layer is not enabled.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/meson.build      | 5 +----
 src/v4l2/meson.build | 4 ++++
 2 files changed, 5 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/src/meson.build b/src/meson.build
index 8e219943acb8..4b75f05878bc 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -21,8 +21,5 @@  subdir('ipa')
 subdir('cam')
 subdir('qcam')
 
-if get_option('v4l2')
-    subdir('v4l2')
-endif
-
 subdir('gstreamer')
+subdir('v4l2')
diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build
index e3838f0b07cc..dbe6a424b10e 100644
--- a/src/v4l2/meson.build
+++ b/src/v4l2/meson.build
@@ -1,5 +1,9 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
+if not get_option('v4l2')
+    subdir_done()
+endif
+
 v4l2_compat_sources = files([
     'v4l2_camera.cpp',
     'v4l2_camera_file.cpp',