From patchwork Tue Jan 14 21:19:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 22578 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 1A75CC3304 for ; Tue, 14 Jan 2025 21:19:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5B4F968521; Tue, 14 Jan 2025 22:19:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Rl+DXW8V"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30870607D6 for ; Tue, 14 Jan 2025 22:19:47 +0100 (CET) Received: from Monstersaurus.tail69b4.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1DC13842; Tue, 14 Jan 2025 22:18:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1736889529; bh=G4wVwFJxCLvJzg9zUtk/FmuoOG2IyeRuBp7rm0/PNvg=; h=From:To:Cc:Subject:Date:From; b=Rl+DXW8V/5gX7tA98tBjX5eu/XHIw5WH7uRcb9C76xc3qCIxx+Jyl+aZK57Kgi1pR 4FSmXHvYN80TRZycuemTKrACr9PnMhTGPFGPWRw/SxcVtKHEz1gDviBUvIjIafAT85 GTAHYs2owtIPlTj6cN4rf1MWiuZ/Ruljc6yxVFuc= From: Kieran Bingham To: libcamera devel Cc: =?utf-8?q?Dylan_A=C3=AFssi?= , =?utf-8?q?Dylan_A=C3=AFssi?= , Kieran Bingham Subject: [PATCH] libcamera: meson: Fix libyuv detection Date: Tue, 14 Jan 2025 21:19:35 +0000 Message-ID: <20250114211935.715028-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.47.1 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" From: Dylan Aïssi We already fall back to a subproject to support the libyuv package when it can not be discovered through the usual dependency() mechanism. Unfortunately libyuv may be packaged without any corresponding pkg-config support as can be seen at [0], so further extend the dependency search by using an explicit cc.find_library() call. [0] https://packages.debian.org/bookworm/amd64/libyuv-dev/filelist Signed-off-by: Dylan Aïssi Signed-off-by: Kieran Bingham Tested-by: Kieran Bingham --- src/meson.build | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/meson.build b/src/meson.build index 76198e9535db..0a9cdff8e7dc 100644 --- a/src/meson.build +++ b/src/meson.build @@ -27,10 +27,15 @@ else ipa_sign_module = false endif -# libyuv, used by the Android adaptation layer and the virtual pipeline handler. -# Fallback to a subproject if libyuv isn't found, as it's typically not provided -# by distributions. +# libyuv, used by the Android adaptation layer and the virtual pipeline +# handler. Fallback to a subproject if libyuv isn't found, as it's typically +# not provided by distributions. Where libyuv is provided by a distribution, it +# may not always supply a pkg-config implementation, requiring cc.find_library() +# to search for it. libyuv_dep = dependency('libyuv', required : false) +if not libyuv_dep.found() + libyuv_dep = cc.find_library('yuv', required: false) +endif if (pipelines.contains('virtual') or get_option('android').allowed()) and \ not libyuv_dep.found()