From patchwork Wed Mar 20 15:47:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 745 Return-Path: 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 9229D610BF for ; Wed, 20 Mar 2019 16:47:53 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E984A2D0; Wed, 20 Mar 2019 16:47:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1553096873; bh=9dwPVAGPXhq9o/LEQ632QkCrsreIb2X5VWIft8t6+2E=; h=From:To:Cc:Subject:Date:From; b=IAN9t0HLkl6+dVg9e5t43QZkSj6/hHTGILgbbcQ/qdqmuWLPE1oXmy0umLoa3fcpy h66tIypzrke3lL6pIxBgvZQhn4aplKNgzxLlMrfYtKimDyfIkDD5MR5K5pctypbeuZ aW5YoKESSH343IRsUu9m3Rmllnwfc+9uC5x9xNWg= From: Kieran Bingham To: LibCamera Devel Date: Wed, 20 Mar 2019 15:47:48 +0000 Message-Id: <20190320154748.27326-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson: Provide options to disable test/docs X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2019 15:47:53 -0000 It can be desirable to disable the compilation and processing of both the test suite and documentation for use cases such as packaging to an embedded target. Provide a new meson_options.txt file to allow disabling either or both of the tests and documentation components of libcamera. These options can be provided at the initial configuration time, for example: meson build -Dtests=false -Ddocumentation=false or by reconfiguring an existing build tree: cd build meson configure -Ddocumentation=false meson configure -Dtests=false Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- meson.build | 10 ++++++++-- meson_options.txt | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 4465a3851a30..43d4a57602bb 100644 --- a/meson.build +++ b/meson.build @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include') subdir('include') subdir('src') -subdir('test') subdir('utils') -subdir('Documentation') + +if get_option('tests') + subdir('test') +endif + +if get_option('documentation') + subdir('Documentation') +endif pkg_mod = import('pkgconfig') pkg_mod.generate(libraries : libcamera, diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000000..c5df661a2286 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('tests', type : 'boolean') +option('documentation', type : 'boolean')