[PATCH] meson: Group libipa and libipa_includes in a dependency object

Barnabás Pőcze pobrn at protonmail.com
Tue Jun 11 23:24:16 CEST 2024


2024. június 11., kedd 16:25 keltezéssel, Laurent Pinchart <laurent.pinchart at ideasonboard.com> írta:

> On Tue, Jun 11, 2024 at 01:40:55PM +0000, Barnabás Pőcze wrote:
> > 2024. június 11., kedd 14:42 keltezéssel, Laurent Pinchart írta:
> >
> > > Many build targets link with libipa and need libipa_includes. Group them
> > > in a libipa_dep dependency object to simplify the users.
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > > ---
> > >  src/ipa/ipu3/meson.build    | 5 ++---
> > >  src/ipa/libipa/meson.build  | 4 ++++
> > >  src/ipa/rkisp1/meson.build  | 5 ++---
> > >  src/ipa/rpi/vc4/meson.build | 4 +---
> > >  src/ipa/simple/meson.build  | 5 ++---
> > >  src/ipa/vimc/meson.build    | 5 ++---
> > >  test/ipa/meson.build        | 6 +++---
> > >  test/ipa/rkisp1/meson.build | 6 +++---
> > >  8 files changed, 19 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build
> > > index 66c398432d43..e76f97c07c87 100644
> > > --- a/src/ipa/ipu3/meson.build
> > > +++ b/src/ipa/ipu3/meson.build
> > > @@ -15,9 +15,8 @@ ipu3_ipa_sources += ipu3_ipa_algorithms
> > >  mod = shared_module(ipa_name,
> > >                      [ipu3_ipa_sources, libcamera_generated_ipa_headers],
> > >                      name_prefix : '',
> > > -                    include_directories : [ipa_includes, libipa_includes],
> > > -                    dependencies : libcamera_private,
> > > -                    link_with : libipa,
> > > +                    include_directories : [ipa_includes],
> > > +                    dependencies : [libcamera_private, libipa_dep],
> > >                      install : true,
> > >                      install_dir : ipa_install_dir)
> > >
> > > diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build
> > > index 8ec9c7847348..7f038c90cd87 100644
> > > --- a/src/ipa/libipa/meson.build
> > > +++ b/src/ipa/libipa/meson.build
> > > @@ -27,3 +27,7 @@ libipa_includes = include_directories('..')
> > >  libipa = static_library('ipa', [libipa_sources, libipa_headers],
> > >                          include_directories : ipa_includes,
> > >                          dependencies : libcamera_private)
> > > +
> > > +libipa_dep = declare_dependency(sources : libipa_headers,
> >
> > Is this `sources` argument necessary?
> 
> Probably not, as we don't generate any of those headers. They shouldn't
> hurt though, as the dependency on sources and headers is already there
> implicitly, through 'link_with: libipa'. Should I drop the sources here
> or keep them to be ready for code generation in the future ?  :-)

It was just unexpected for me to see it because I hadn't seen anything that
would necessitate it, so I would omit it. But as you said, it does not change anything now.


Regards,
Barnabás Pőcze

> 
> > > +                                include_directories : libipa_includes,
> > > +                                link_with : libipa)
> > > [...]
> 
> --
> Regards,
> 
> Laurent Pinchart


More information about the libcamera-devel mailing list