| Message ID | 20260129164032.1380169-6-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > This way the dependencies are only added if they are actually used. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > --- > src/libcamera/meson.build | 6 ------ > src/libcamera/software_isp/meson.build | 11 ++++++++++- > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build > index 72b7bf02d..575408b2c 100644 > --- a/src/libcamera/meson.build > +++ b/src/libcamera/meson.build > @@ -70,10 +70,6 @@ libcamera_deps = [] > libatomic = cc.find_library('atomic', required : false) > libthreads = dependency('threads') > > -libegl = dependency('egl', required : false) > -libglesv2 = dependency('glesv2', required : false) > -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) > - > subdir('base') > subdir('converter') > subdir('ipa') > @@ -182,8 +178,6 @@ libcamera_deps += [ > libcamera_base_private, > libcrypto, > libdl, > - libegl, > - libglesv2, > liblttng, > libudev, > libyaml, > diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build > index 118d3f92f..cbcd3c1b3 100644 > --- a/src/libcamera/software_isp/meson.build > +++ b/src/libcamera/software_isp/meson.build > @@ -2,12 +2,17 @@ > > softisp_enabled = pipelines.contains('simple') > summary({'SoftISP support' : softisp_enabled}, section : 'Configuration') > -summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') > > if not softisp_enabled > subdir_done() > endif > > +libegl = dependency('egl', required : false) > +libglesv2 = dependency('glesv2', required : false) > +mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) > + > +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') > + > libcamera_internal_sources += files([ > 'benchmark.cpp', > 'debayer.cpp', > @@ -22,4 +27,8 @@ if mesa_works > '../egl.cpp', > 'debayer_egl.cpp', > ]) > + libcamera_deps += [ > + libegl, > + libglesv2, > + ] > endif
Hi Barnabás, Thank you for the patch. On Thu, Jan 29, 2026 at 05:40:31PM +0100, Barnabás Pőcze wrote: > This way the dependencies are only added if they are actually used. I don't object to this for the time being, but note that the plan is to make GPU acceleration available to other pipeline handlers for post-processing tasks, unrelated to the soft ISP. We'll have to move the dependencies back to the libcamera core then. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > src/libcamera/meson.build | 6 ------ > src/libcamera/software_isp/meson.build | 11 ++++++++++- > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build > index 72b7bf02d..575408b2c 100644 > --- a/src/libcamera/meson.build > +++ b/src/libcamera/meson.build > @@ -70,10 +70,6 @@ libcamera_deps = [] > libatomic = cc.find_library('atomic', required : false) > libthreads = dependency('threads') > > -libegl = dependency('egl', required : false) > -libglesv2 = dependency('glesv2', required : false) > -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) > - > subdir('base') > subdir('converter') > subdir('ipa') > @@ -182,8 +178,6 @@ libcamera_deps += [ > libcamera_base_private, > libcrypto, > libdl, > - libegl, > - libglesv2, > liblttng, > libudev, > libyaml, > diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build > index 118d3f92f..cbcd3c1b3 100644 > --- a/src/libcamera/software_isp/meson.build > +++ b/src/libcamera/software_isp/meson.build > @@ -2,12 +2,17 @@ > > softisp_enabled = pipelines.contains('simple') > summary({'SoftISP support' : softisp_enabled}, section : 'Configuration') > -summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') > > if not softisp_enabled > subdir_done() > endif > > +libegl = dependency('egl', required : false) > +libglesv2 = dependency('glesv2', required : false) > +mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) > + > +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') > + > libcamera_internal_sources += files([ > 'benchmark.cpp', > 'debayer.cpp', > @@ -22,4 +27,8 @@ if mesa_works > '../egl.cpp', > 'debayer_egl.cpp', > ]) > + libcamera_deps += [ > + libegl, > + libglesv2, > + ] > endif
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 72b7bf02d..575408b2c 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -70,10 +70,6 @@ libcamera_deps = [] libatomic = cc.find_library('atomic', required : false) libthreads = dependency('threads') -libegl = dependency('egl', required : false) -libglesv2 = dependency('glesv2', required : false) -mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) - subdir('base') subdir('converter') subdir('ipa') @@ -182,8 +178,6 @@ libcamera_deps += [ libcamera_base_private, libcrypto, libdl, - libegl, - libglesv2, liblttng, libudev, libyaml, diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build index 118d3f92f..cbcd3c1b3 100644 --- a/src/libcamera/software_isp/meson.build +++ b/src/libcamera/software_isp/meson.build @@ -2,12 +2,17 @@ softisp_enabled = pipelines.contains('simple') summary({'SoftISP support' : softisp_enabled}, section : 'Configuration') -summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') if not softisp_enabled subdir_done() endif +libegl = dependency('egl', required : false) +libglesv2 = dependency('glesv2', required : false) +mesa_works = cc.check_header('EGL/egl.h', required : false, dependencies : libegl) + +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration') + libcamera_internal_sources += files([ 'benchmark.cpp', 'debayer.cpp', @@ -22,4 +27,8 @@ if mesa_works '../egl.cpp', 'debayer_egl.cpp', ]) + libcamera_deps += [ + libegl, + libglesv2, + ] endif
This way the dependencies are only added if they are actually used. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/libcamera/meson.build | 6 ------ src/libcamera/software_isp/meson.build | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-)