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

Jacopo Mondi jacopo at jmondi.org
Fri Feb 26 09:01:25 CET 2021


Hi Laurent, Paul,

On Thu, Feb 25, 2021 at 08:16:04PM +0200, Laurent Pinchart wrote:
> 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) ?
>

I would be glad if this would be possible and I think android_platform
is a good compromise. Although I wonder if for the same 'platform' we
might have different 'memory backends' depending on, in example,
versioning. However I think it's fine for the time being..

Is this change is here to stay or not ? I still wonder if the fix is
temporary.

> > >  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
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list