From patchwork Wed Sep 29 09:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 14521 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by patchwork.libcamera.org (Postfix) with ESMTPS id 031C7BF415 for ; Wed, 10 Nov 2021 13:58:11 +0000 (UTC) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 90903501 for ; Wed, 10 Nov 2021 14:58:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1636552691; bh=qR7YqITat2c/d1YZVSh7KAw6dKVM6bqAzgAVMCTy7pA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Resent-From:Resent-To:From; b=bCeeIPedWcx0564SpscdyZd+QHE2XUOOBZhybciMtNdxnHI5CYT7pru/XLdkFWeJl RtUs1fjSw7T9wConMosDPMlSX8yXguSO9aLHlFV9q2fjHQpzm+4wAIyT50KwspkZjW /GtrtG1Td9o8aas39VUlOXY7a6/36GAakbv2Mu98= Delivered-To: kbingham@ideasonboard.com Received: from perceval.ideasonboard.com by perceval.ideasonboard.com with LMTP id SP2JCOs0VGElOQAA4E0KoQ (envelope-from ) for ; Wed, 29 Sep 2021 11:42:03 +0200 Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by perceval.ideasonboard.com (Postfix) with ESMTPS id 0CC153F0; Wed, 29 Sep 2021 11:42:03 +0200 (CEST) Authentication-Results: perceval.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PmEpClXI"; dkim-atps=neutral Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAF38691AF; Wed, 29 Sep 2021 11:42:02 +0200 (CEST) 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="PmEpClXI"; 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 E58646919D for ; Wed, 29 Sep 2021 11:41:57 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 805893F0 for ; Wed, 29 Sep 2021 11:41:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632908517; bh=qR7YqITat2c/d1YZVSh7KAw6dKVM6bqAzgAVMCTy7pA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PmEpClXIIeFfRDjyw0yzUHsEkEd4ZKPfsH75vha7y4irvV4VBXU97TQfsjB15+GGE sXIPVZk7+zPGqxj/xKJJ2Ls85Ri6HBaFCpL15du5UtqzYojH3RxldlkAMoIRC4Ca5F JtB3hB6bsh9q9p+plHH5cMxI7ubGjee/mpIgONmE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Sep 2021 12:41:48 +0300 Message-Id: <20210929094148.1965-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210929094148.1965-1-laurent.pinchart@ideasonboard.com> References: <20210929094148.1965-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] libcamera: Simplify header install paths with shortcut variables 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" X-TUID: mwJM3SiLd+9t Resent-From: Kieran Bingham Resent-To: parsemail@patchwork.libcamera.org Create local install_dir meson variable to store the full path to the installation directory for the libcamera and ipa headers. This shortens lines and avoids duplicating calls to get_option('includedir'). Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Changes since v1: - Rename install_dir --- include/libcamera/ipa/meson.build | 6 ++++-- include/libcamera/meson.build | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build index 81fb69f0b681..6ea94fb53f43 100644 --- a/include/libcamera/ipa/meson.build +++ b/include/libcamera/ipa/meson.build @@ -13,6 +13,8 @@ install_headers(libcamera_ipa_headers, libcamera_generated_ipa_headers = [] +ipa_headers_install_dir = get_option('includedir') / libcamera_ipa_include_dir + # # Prepare IPA/IPC generation components # @@ -34,7 +36,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h', output : 'core_ipa_interface.h', depends : mojom_templates, install : true, - install_dir : get_option('includedir') / libcamera_ipa_include_dir, + install_dir : ipa_headers_install_dir, command : [ mojom_generator, 'generate', '-g', 'libcamera', @@ -98,7 +100,7 @@ foreach file : ipa_mojom_files output : name + '_ipa_interface.h', depends : mojom_templates, install : true, - install_dir : get_option('includedir') / libcamera_ipa_include_dir, + install_dir : ipa_headers_install_dir, command : [ mojom_generator, 'generate', '-g', 'libcamera', diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 567782a66ba3..7155ff203f6e 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -29,6 +29,8 @@ install_headers(libcamera_public_headers, # Generate headers from templates. # +libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir + # control_ids.h and property_ids.h control_source_files = [ 'control_ids', @@ -44,7 +46,7 @@ foreach header : control_source_files output : header + '.h', command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'], install : true, - install_dir : get_option('includedir') / libcamera_include_dir) + install_dir : libcamera_headers_install_dir) endforeach libcamera_public_headers += control_headers @@ -59,7 +61,7 @@ formats_h = custom_target('formats_h', output : 'formats.h', command : [gen_formats, '-o', '@OUTPUT@', '@INPUT@'], install : true, - install_dir : get_option('includedir') / libcamera_include_dir) + install_dir : libcamera_headers_install_dir) libcamera_public_headers += formats_h # libcamera.h @@ -68,7 +70,7 @@ libcamera_h = custom_target('gen-header', output : 'libcamera.h', command : [gen_header, meson.current_source_dir(), '@OUTPUT@'], install : true, - install_dir : get_option('includedir') / libcamera_include_dir) + install_dir : libcamera_headers_install_dir) libcamera_public_headers += libcamera_h @@ -82,4 +84,4 @@ libcamera_version_config.set('LIBCAMERA_VERSION_PATCH', version[2]) configure_file(input : 'version.h.in', output : 'version.h', configuration : libcamera_version_config, - install_dir : get_option('includedir') / libcamera_include_dir) + install_dir : libcamera_headers_install_dir)