From patchwork Mon Dec 16 17:52:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 22371 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7E734C32DA for ; Mon, 16 Dec 2024 17:52:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C9A2667F95; Mon, 16 Dec 2024 18:52:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="u5dJfcUx"; dkim-atps=neutral Received: from mail-10628.protonmail.ch (mail-10628.protonmail.ch [79.135.106.28]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C4FDF67F7F for ; Mon, 16 Dec 2024 18:52:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734371539; x=1734630739; bh=nIq4rM7LX1pQGHOP9Y4Sdne2em5iottX928VNH2jx6c=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=u5dJfcUxKr2gCXNGnbdhXFLAwhfC5LDjptEPYsJ99pmeHZShSFq+XeM9xK9xPbfI/ gOi6aKujYmmvllnoA7+w9O8DLvJXZndyGsmNiYuiTQLqXLVPZQcuMeEp8RQZZam6jv uoa6q4ioSkHsQZaW/+lDcbBGLiWMezrweW7NnKAWApQWYhRpu3a0zkNfN+snvIFzzY QMzwA58iwLLIvTN3Pj6UZfHVbxwIKq7M8TlD9kCin2Jkp6wJQ9PQ9MWiT7P43WYv9r YC4HbCigQ5Hd4k/RtK+LGdRpbD3j/qNtLRyHlIZXUnDB+xEt5VcMlfomHf9Qs+L+sD tVmdKJfBtF0Zg== Date: Mon, 16 Dec 2024 17:52:15 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Cc: Laurent Pinchart , Kieran Bingham Subject: [PATCH v2] meson: Convert `v4l2` into a feature option Message-ID: <20241216175213.1106544-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 6512e9ac070c46d1d1d107d3508630a457c18698 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The v4l2 compatibility layer does not have external dependencies, the usual benefits of a feature option do not apply. The main motivation behind this change is making use of the `auto_features` meson option that can change all feature options set to "auto" by default to the desired value. This can be useful for two reasons: (1) using auto_features=disabled and then building up the list of features that are desired in the particular build; (2) using auto_features=enabled to achieve (usually) more testing and compilation coverage. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- meson_options.txt | 7 ++++--- src/v4l2/meson.build | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index c91cd241a..1f70da0f5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -84,6 +84,7 @@ option('udev', description : 'Enable udev support for hotplug') option('v4l2', - type : 'boolean', - value : false, - description : 'Compile the V4L2 compatibility layer') + type : 'feature', + value : 'auto', + description : 'Compile the V4L2 compatibility layer', + deprecated : {'true': 'enabled', 'false': 'disabled'}) diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index 58f53bf3d..2c0404147 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -1,12 +1,11 @@ # SPDX-License-Identifier: CC0-1.0 -if not get_option('v4l2') - v4l2_enabled = false +v4l2_enabled = get_option('v4l2').allowed() + +if not v4l2_enabled subdir_done() endif -v4l2_enabled = true - v4l2_compat_sources = files([ 'v4l2_camera.cpp', 'v4l2_camera_file.cpp',