[libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera pkg-config generation

Hirokazu Honda hiroh at chromium.org
Fri Jun 25 05:09:15 CEST 2021


Hi Kieran, thank you for the patch.

On Fri, Jun 25, 2021 at 11:29 AM <paul.elder at ideasonboard.com> wrote:
>
> Hi Kieran,
>
> On Fri, Jun 25, 2021 at 02:35:27AM +0100, Kieran Bingham wrote:
> > The libcamera library is moved to the first positional argument of the
> > pkg-config generator to automatically populate the name and filebase
> > values for the package.
> >
> > As part of this, the shared library name is adjusted to the full library
> > name 'libcamera', without relying upon the automatic 'lib' prefix which
> > better represents the component and naming of the library.
> >
> > As a result of this, the pkgconfig file is now named 'libcamera.pc' as
> > opposed to 'camera.pc', and applications desiring to reference libcamera
> > will need to search for 'libcamera' as a dependency rather than
> > 'camera'.
> >
> > The library itself is still created and installed as 'libcamera.so'.
> >
> > An example meson.build file would need to be adjusted as the following:
> >
> > -      dependency('camera', required : true),
> > +      dependency('libcamera', required : true),
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
>

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>

> > ---
> >  src/libcamera/meson.build | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> > index e4c60e736697..387d20843203 100644
> > --- a/src/libcamera/meson.build
> > +++ b/src/libcamera/meson.build
> > @@ -135,8 +135,9 @@ libcamera_deps = [
> >  # runtime if the library is running from an installed location by checking
> >  # for the presence or abscence of the dynamic tag.
> >
> > -libcamera = shared_library('camera',
> > +libcamera = shared_library('libcamera',
> >                             libcamera_sources,
> > +                           name_prefix : '',
> >                             install : true,
> >                             include_directories : includes,
> >                             build_rpath : '/',
> > @@ -157,10 +158,8 @@ libcamera_dep = declare_dependency(sources : [
> >                                     link_with : libcamera)
> >
> >  pkg_mod = import('pkgconfig')
> > -pkg_mod.generate(libraries: libcamera,
> > +pkg_mod.generate(libcamera,
> >                   version : '1.0',
> > -                 name : 'libcamera',
> > -                 filebase : 'camera',
> >                   description : 'Complex Camera Support Library',
> >                   subdirs : 'libcamera')
> >
> > --
> > 2.30.2
> >


More information about the libcamera-devel mailing list