[libcamera-devel] [PATCH v1 4/6] apps: Move libevent dependency to src/apps/meson.build

paul.elder at ideasonboard.com paul.elder at ideasonboard.com
Thu Oct 20 08:53:50 CEST 2022


On Thu, Oct 20, 2022 at 02:15:35AM +0300, Laurent Pinchart via libcamera-devel wrote:
> libtiff is a shared dependency between cam and lc-compliance, move it to
> src/apps/. The shared dependency will be used to condition compilation
> of source files in an upcoming application static library.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>

> ---
>  src/apps/cam/meson.build           | 4 +---
>  src/apps/lc-compliance/meson.build | 3 +--
>  src/apps/meson.build               | 8 ++++++++
>  3 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build
> index 06dbea0645b7..4b6099ddab63 100644
> --- a/src/apps/cam/meson.build
> +++ b/src/apps/cam/meson.build
> @@ -1,8 +1,6 @@
>  # SPDX-License-Identifier: CC0-1.0
>  
> -libevent = dependency('libevent_pthreads', required : get_option('cam'))
> -
> -if not libevent.found()
> +if opt_cam.disabled() or not libevent.found()
>      cam_enabled = false
>      subdir_done()
>  endif
> diff --git a/src/apps/lc-compliance/meson.build b/src/apps/lc-compliance/meson.build
> index 8b57474be2b2..05d622be0a40 100644
> --- a/src/apps/lc-compliance/meson.build
> +++ b/src/apps/lc-compliance/meson.build
> @@ -1,10 +1,9 @@
>  # SPDX-License-Identifier: CC0-1.0
>  
> -libevent = dependency('libevent_pthreads', required : get_option('lc-compliance'))
>  libgtest = dependency('gtest', required : get_option('lc-compliance'),
>                        fallback : ['gtest', 'gtest_dep'])
>  
> -if not (libevent.found() and libgtest.found())
> +if opt_lc_compliance.disabled() or not libevent.found() or not libgtest.found()
>      lc_compliance_enabled = false
>      subdir_done()
>  endif
> diff --git a/src/apps/meson.build b/src/apps/meson.build
> index 9e4388bd7881..159deb0b7fc2 100644
> --- a/src/apps/meson.build
> +++ b/src/apps/meson.build
> @@ -1,5 +1,13 @@
>  # SPDX-License-Identifier: CC0-1.0
>  
> +opt_cam = get_option('cam')
> +opt_lc_compliance = get_option('lc-compliance')
> +
> +libevent = dependency('libevent_pthreads', required : opt_cam)
> +if not libevent.found()
> +    libevent = dependency('libevent_pthreads', required : opt_lc_compliance)
> +endif
> +
>  subdir('lc-compliance')
>  
>  subdir('cam')


More information about the libcamera-devel mailing list