diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-20 23:35:36 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-23 19:15:55 +0200 |
commit | c7dd9655e5e0a95e3a776eb92f54841a68b82331 (patch) | |
tree | 53f6661b8a483423c6770f34829e4f6202845e0b | |
parent | 976e01d59beecb7c1eb79396e8ec1f8d066fa355 (diff) |
meson: Add configuration option to build the cam application
Building the cam application isn't always desired, for instance in a
production environment that only needs the libcamera library. Add a
meson option to disable it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | meson_options.txt | 5 | ||||
-rw-r--r-- | src/cam/meson.build | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/meson_options.txt b/meson_options.txt index f6b6c65c..12de8fa1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,6 +11,11 @@ option('android_platform', value : 'generic', description : 'Select the Android platform to compile for') +option('cam', + type : 'feature', + value : 'auto', + description : 'Compile the cam test application') + option('documentation', type : 'feature', description : 'Generate the project documentation') diff --git a/src/cam/meson.build b/src/cam/meson.build index f0c08589..65784bed 100644 --- a/src/cam/meson.build +++ b/src/cam/meson.build @@ -1,9 +1,8 @@ # SPDX-License-Identifier: CC0-1.0 -libevent = dependency('libevent_pthreads', required : false) +libevent = dependency('libevent_pthreads', required : get_option('cam')) if not libevent.found() - warning('libevent_pthreads not found, \'cam\' application will not be compiled') subdir_done() endif |