[libcamera-devel] [PATCH 2/2] v4l2: Move the v4l2-compat to libcamera/

Javier Martinez Canillas javierm at redhat.com
Wed May 3 14:51:38 CEST 2023


Hello Kieran,

Thanks for your patch.

On 5/1/23 17:55, Kieran Bingham wrote:
> Move the v4l2-compat.so shared library installation to the libcamera
> library directory. This is the same location that IPA modules live and
> will allow the 'generically sounding' v4l2-compat.so to be more clearly
> identified as a libcamera compatibility layer.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> We could also rename this to libcamera-v4l2-compat.so, and/or we could
> also re-consider whether the libcamera-hal.so file should also live
> under the libcamera/ libdir by default.
> 
>  src/v4l2/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build
> index f132103cb503..114fddf7302a 100644
> --- a/src/v4l2/meson.build
> +++ b/src/v4l2/meson.build
> @@ -31,6 +31,7 @@ v4l2_compat = shared_library('v4l2-compat',
>                               v4l2_compat_sources,
>                               name_prefix : '',
>                               install : true,
> +                             install_dir : libcamera_libdir,
>                               dependencies : [libcamera_private, libdl],
>                               cpp_args : v4l2_compat_cpp_args)
>  
> @@ -38,7 +39,7 @@ v4l2_compat = shared_library('v4l2-compat',
>  # adaptation layer.
>  
>  cdata = configuration_data()
> -cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / get_option('libdir') / 'v4l2-compat.so')
> +cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / libcamera_libdir / 'v4l2-compat.so')
>

As Laurent mentioned in another thread, I think that:

+cdata.set('LIBCAMERA_V4L2_SO', get_option('libexecdir') / 'libcamera' / 'v4l2-compat.so')

would be better and more consistent with how other projects install
shared objects that are not meant to be public.

That would also solve the issue I had when trying to enable the v4l2
compatibility layer and ship it in a separate libcamera-v4l2 sub-package.

If you post a v2 with that change, feel free to add my:

Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the libcamera-devel mailing list