From patchwork Mon Dec 7 15:07:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10593 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 EAF4EBDB20 for ; Mon, 7 Dec 2020 15:07:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8965967E50; Mon, 7 Dec 2020 16:07:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NoAsvJPO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C0EDA63546 for ; Mon, 7 Dec 2020 16:07:43 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B1F645D; Mon, 7 Dec 2020 16:07:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607353663; bh=/kn+pKO4x3p1qU1XkKJYYUy+lbyjJNEc6gXfnPstHNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoAsvJPOnRIyAJokj0NjRAGqVa/yr0ojckbijkxieq3gQUOeA2ZbojuXkAzwUgxMi IBFuolsF1bTC6Tz4GqPvlLpAq5VXf9uPHjnnWmH1ZWzb/npVF+XFkea+IgK4LeLOD7 zxYQrA724sfLZu+ZqFDt5SVs9UU75cuFMJR1jTp0= From: Kieran Bingham To: libcamera devel Date: Mon, 7 Dec 2020 15:07:34 +0000 Message-Id: <20201207150737.307692-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> References: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/4] src: meson: Re-order subdir layout 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" Move the android subdir below the configuration options to keep all subdirs together. Add a comment explaining why android must come first, and some padding to group the libcamera and ipa components, applications, and remaining adaptation layers. Signed-off-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index b9c7e7599d61..8e219943acb8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,7 +1,5 @@ # SPDX-License-Identifier: CC0-1.0 -subdir('android') - openssl = find_program('openssl', required : true) if openssl.found() ipa_priv_key = custom_target('ipa-priv-key', @@ -13,8 +11,13 @@ else ipa_sign_module = false endif +# The 'android' subdir must be processed first, and the build targets +# are included directly into the libcamera library when this is enabled. +subdir('android') + subdir('libcamera') subdir('ipa') + subdir('cam') subdir('qcam') From patchwork Mon Dec 7 15:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10594 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 1FD73BDB20 for ; Mon, 7 Dec 2020 15:07:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E2BED67E4E; Mon, 7 Dec 2020 16:07:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="g8G7DY1X"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 223CB67E51 for ; Mon, 7 Dec 2020 16:07:44 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 956768D; Mon, 7 Dec 2020 16:07:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607353663; bh=twvfnWI7D11NJkfo1eU2Xx2SflgBrLQMyuGTXrKuVsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8G7DY1XtXGLAy3tbrc7GHFYPa7bnV0/TMOEyQyr3VbRkbuv42c1UIePNjgfEFLtu O56Fgf74qCGxUEYCQIudSv/OU1yz2w870Zw+zTP85wxh9W05QMLPzkLYpL8Oczn+8O a/Lj57V3uAjgQGFstV9hkxG5q0SDbjiO1Pxz9ptc= From: Kieran Bingham To: libcamera devel Date: Mon, 7 Dec 2020 15:07:35 +0000 Message-Id: <20201207150737.307692-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> References: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] src: meson: Simplify v4l2 enablement 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" 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 Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/meson.build | 5 +---- src/v4l2/meson.build | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) 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', From patchwork Mon Dec 7 15:07:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10595 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 A1AB6BDB20 for ; Mon, 7 Dec 2020 15:07:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 414B567E5C; Mon, 7 Dec 2020 16:07:47 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZRn1gcAR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6310367E54 for ; Mon, 7 Dec 2020 16:07:44 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EA28251D; Mon, 7 Dec 2020 16:07:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607353664; bh=w3O6CVuRXkCi/9rd/xWHEbPF04ui1FHtqu3KS2i1iBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZRn1gcARUrIbbj0/KcB2P145/BUc24uFa8mTd4/wc+2s9LH/qLr7M8PQfdz2tO00v MDff5xwZEBls2jfFSAUAZD5rFyWYTqVLJSmqDzxd+ljttBczRRknZudtOsYe2yU2C7 xc4BsEGm6PtBAErFWGuv3TSs65FqjKg5r52QkgcI= From: Kieran Bingham To: libcamera devel Date: Mon, 7 Dec 2020 15:07:36 +0000 Message-Id: <20201207150737.307692-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> References: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] src: meson: Define system paths 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" Define libcamera specific system paths for use within the library code base. These can be used to identify system configuration files and shared data. Also, make use of the new system path variables and map the ipa paths upon the libcamera system path, making use of the new shorter syntax for join_paths(). Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- v2: - Add comments explaining why we can't use prefix throughout - Squash src/meson and src/ipa/meson changes together src/ipa/meson.build | 19 ++++++++++--------- src/meson.build | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 5a5de267c147..41625ed471bc 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -1,19 +1,17 @@ # SPDX-License-Identifier: CC0-1.0 -ipa_install_dir = join_paths(get_option('libdir'), 'libcamera') -ipa_data_dir = join_paths(get_option('datadir'), 'libcamera', 'ipa') -ipa_sysconf_dir = join_paths(get_option('sysconfdir'), 'libcamera', 'ipa') - ipa_includes = [ libcamera_includes, ] -config_h.set('IPA_CONFIG_DIR', - '"' + join_paths(get_option('prefix'), ipa_sysconf_dir) + - ':' + join_paths(get_option('prefix'), ipa_data_dir) + '"') +ipa_install_dir = libcamera_libdir +ipa_data_dir = libcamera_datadir / 'ipa' +ipa_sysconf_dir = libcamera_sysconfdir / 'ipa' + +config_h.set('IPA_CONFIG_DIR', '"' + prefix / ipa_sysconf_dir + + ':' + prefix / ipa_data_dir + '"') -config_h.set('IPA_MODULE_DIR', - '"' + join_paths(get_option('prefix'), ipa_install_dir) + '"') +config_h.set('IPA_MODULE_DIR', '"' + prefix / ipa_install_dir + '"') subdir('libipa') @@ -22,6 +20,9 @@ ipa_sign = files('ipa-sign.sh') ipas = ['raspberrypi', 'rkisp1', 'vimc'] ipa_names = [] +# The ipa-sign-install.sh script which uses the ipa_names variable will itself +# prepend MESON_INSTALL_DESTDIR_PREFIX to each ipa module name, therefore we +# must not include the prefix string here. foreach pipeline : get_option('pipelines') if ipas.contains(pipeline) subdir(pipeline) diff --git a/src/meson.build b/src/meson.build index 4b75f05878bc..f98fcede203b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,5 +1,19 @@ # SPDX-License-Identifier: CC0-1.0 +# Handle system paths +datadir = get_option('datadir') +libdir = get_option('libdir') +prefix = get_option('prefix') +sysconfdir = get_option('sysconfdir') + +libcamera_datadir = datadir / 'libcamera' +libcamera_libdir = libdir / 'libcamera' +libcamera_sysconfdir = sysconfdir / 'libcamera' + +config_h.set('LIBCAMERA_DATA_DIR', '"' + prefix / libcamera_datadir + '"') +config_h.set('LIBCAMERA_SYSCONF_DIR', '"' + prefix / libcamera_sysconfdir + '"') + +# Module Signing openssl = find_program('openssl', required : true) if openssl.found() ipa_priv_key = custom_target('ipa-priv-key', From patchwork Mon Dec 7 15:07:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10596 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 E9F85BDB21 for ; Mon, 7 Dec 2020 15:07:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8B30467E5E; Mon, 7 Dec 2020 16:07:47 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OMT9VakQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A1B7863546 for ; Mon, 7 Dec 2020 16:07:44 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3BFC445D; Mon, 7 Dec 2020 16:07:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607353664; bh=kXqBwv+RjoCiRWGFQXhlBOEdFxJ26KRvzlJCKTtJpmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OMT9VakQnD4+7yDQsURSZvW/OaTgHsTleDlqgQdHBrMa1AYNL+lW2aYBzYgiE1x89 zrFttAxyecUcUK0G4L0ld/KyuNE+pfPNSoztmswClvbsimm7cu9ebMKVcZiL2WszKn c9m2ynB/b87MwXeqjy7WeFvTlL9oaJokufUdlRLE= From: Kieran Bingham To: libcamera devel Date: Mon, 7 Dec 2020 15:07:37 +0000 Message-Id: <20201207150737.307692-5-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> References: <20201207150737.307692-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/4] meson: test: Simplify top level meson 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" Utilise the subdir_done() functionality as is used with other optional components to simplify the top level meson file. Suggested-by: Jacopo Mondi Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- meson.build | 5 +---- test/meson.build | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 55cf36e15f57..c47eb420f4db 100644 --- a/meson.build +++ b/meson.build @@ -121,10 +121,7 @@ subdir('src') # through configuration values. They are enabled by default. subdir('Documentation') - -if get_option('test') - subdir('test') -endif +subdir('test') if not meson.is_cross_build() kernel_version_req = '>= 5.0.0' diff --git a/test/meson.build b/test/meson.build index 0a1d434e3996..7f0682ad9efe 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,5 +1,9 @@ # SPDX-License-Identifier: CC0-1.0 +if not get_option('test') + subdir_done() +endif + subdir('libtest') subdir('camera')