[libcamera-devel] [PATCH] meson: options: Add a option to control compilation of qcam
Nicolas Dufresne
nicolas at ndufresne.ca
Tue Jun 16 20:03:15 CEST 2020
Le mardi 16 juin 2020 à 17:27 +0200, Niklas Söderlund a écrit :
> Add a option to control compilation of the qcam test application. The
> default behavior is to compile qcam, no change in behavior without user
> intervention.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> meson_options.txt | 5 +++++
> src/meson.build | 5 ++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/meson_options.txt b/meson_options.txt
> index badace151bb62bc9..9a4edf2a5fde8bcb 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -27,3 +27,8 @@ option('v4l2',
> type : 'boolean',
> value : false,
> description : 'Compile the V4L2 compatibility layer')
> +
> +option('qcam',
> + type : 'boolean',
> + value : true,
> + description : 'Compile the qcam test application')
> diff --git a/src/meson.build b/src/meson.build
> index d69b4c1ea9788f83..3a816fb610a68905 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -19,7 +19,10 @@ endif
> subdir('libcamera')
> subdir('ipa')
> subdir('cam')
> -subdir('qcam')
> +
> +if get_option('qcam')
> + subdir('qcam')
> +endif
It's much cleaner if you check that option inside the subdir
meson.build and call subdir_done() instead.
(ignore if your required meson version is too ancient)
>
> if get_option('v4l2')
> subdir('v4l2')
And then this could be cleaned up.
More information about the libcamera-devel
mailing list