From patchwork Thu Jul 6 07:31:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18793 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 2FC30BDC71 for ; Thu, 6 Jul 2023 07:31:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D4F65628C1; Thu, 6 Jul 2023 09:31:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1688628678; bh=wvhFgYXDva7QKaQFax4/qz7dRM+8GrWWLiUYcJl+TNA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=whFwGkz9ubA8IUNPXnRmnwRLO2MiVuUZlbsv9OWngvX5oyaeSgwwSmg7whn6Me10J S5GDCykkKlf5i57Af7HIOtLCnB/rjFN0Jmn8srhKbwipNeGA0m3auuNYNaFzKXEKL4 pBPM8s08/Wcostz/Gib32p09hh6NCPoo1okrIwlkdMqT5DpXYEOvXuPfKTrjRn62UG Fyzx7D6BUfglMde3UREOFm1U967ue+hKcNyK0MxcnGdhdQvUNSkZR9Tf7VYgkcOxCM 5RngdSVZ3wc8zalcQiCA12D2z3+1tmNc1krejMIKIkKDaEKrBvhIOmcDUO3BTlyDe8 zquPV890x/X8w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C601D628BC for ; Thu, 6 Jul 2023 09:31:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Z0C6eYg/"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (85-160-25-222.reb.o2.cz [85.160.25.222]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 566C16C8; Thu, 6 Jul 2023 09:30:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1688628631; bh=wvhFgYXDva7QKaQFax4/qz7dRM+8GrWWLiUYcJl+TNA=; h=From:To:Cc:Subject:Date:From; b=Z0C6eYg/XdVGN20/zjEvR1zsjsqiqm4mndhjhtzS9l40dlcjUW08xFTzxxuczFAMN Sk3Z+cg9tv/5orvAfiGoLGVMR7fkLPvC3NZ7K1tmHkuIu/rvuy1u6bT0kULt1FqFWN Gw5Y4DM7NgKIkYFIDi9ohp8CvkOIQzdlBywUIq/4= To: libcamera-devel@lists.libcamera.org Date: Thu, 6 Jul 2023 10:31:16 +0300 Message-Id: <20230706073116.1079-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: Add option to configure udev support 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera uses udev to support hotplug (and unplug) detection. This is an optional feature, which gets selected automatically if udev is available. Users may however want to build libcamera without hotplug detection, even if udev is available on the system. Add a new feature option to control udev support. The default value is auto, which retains the existing behaviour. Signed-off-by: Laurent Pinchart --- meson_options.txt | 5 +++++ src/libcamera/meson.build | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) base-commit: d06ed87d49ca3d734fd1c2f1409280abb499c625 prerequisite-patch-id: 03020483e75d365fa1661922fc66b2f16ea11a04 diff --git a/meson_options.txt b/meson_options.txt index 4405b401d7d3..fad928af4b62 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -66,6 +66,11 @@ option('tracing', value : 'auto', description : 'Enable tracing (based on lttng)') +option('udev', + type : 'feature', + value : 'auto', + description : 'Enable udev support for hotplug') + option('v4l2', type : 'boolean', value : false, diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 38fbb41e7d6c..b24f82965764 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -76,7 +76,7 @@ libdl = null_dep if not cc.has_function('dlopen') libdl = cc.find_library('dl') endif -libudev = dependency('libudev', required : false) +libudev = dependency('libudev', required : get_option('udev')) libyaml = dependency('yaml-0.1', required : false) # Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.