[libcamera-devel] [PATCH 1/3] meson: Add cros build option

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Feb 25 19:16:04 CET 2021


Hi Paul,

Thank you for the patch.

On Thu, Feb 25, 2021 at 02:49:15PM +0000, Kieran Bingham wrote:
> On 25/02/2021 10:42, Paul Elder wrote:
> > Add a cros build option to prepare for adding the symbols required for
> > the new cros camera API.
> > 
> > Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> > ---
> >  meson_options.txt       | 5 +++++
> >  src/android/meson.build | 5 +++++
> >  2 files changed, 10 insertions(+)
> > 
> > diff --git a/meson_options.txt b/meson_options.txt
> > index 53f2675e..22efb323 100644
> > --- a/meson_options.txt
> > +++ b/meson_options.txt
> > @@ -5,6 +5,11 @@ option('android',
> >          value : 'disabled',
> >          description : 'Compile libcamera with Android Camera3 HAL interface')
> >  
> > +option('cros',
> > +       type : 'boolean',
> > +       value : 'false',
> > +       description : 'Compile libcamera with the cros Camera3 HAL interface (depends on android option)')
> > +

Jacopo will soon introduce an android_memory_backend option. Would it
make sense to merge the two in an android_platform (bikeshedding on the
name is possible) ?

> >  option('documentation',
> >          type : 'feature',
> >          description : 'Generate the project documentation')
> > diff --git a/src/android/meson.build b/src/android/meson.build
> > index 9719c42b..a13ce63b 100644
> > --- a/src/android/meson.build
> > +++ b/src/android/meson.build
> > @@ -37,6 +37,11 @@ if android_enabled
> >      android_deps += [libyuv_dep]
> >  endif
> >  
> > +if get_option('cros') and not android_enabled
> > +    warning('cros option enabled but android is not, cros option will be ignored')
> > +endif
> > +cros_enabled = get_option('cros') and android_enabled
> > +
> 
> What about having cros enable the android option instead?
> 
> Then ChromeOS platforms only have to select cros=true?

Or we could just silently ignore the cros (or android_platform) option
when android isn't set, I don't think it would confuse anyone.

> >  android_hal_sources = files([
> >      'camera3_hal.cpp',
> >      'camera_hal_manager.cpp',

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list