[v1,4/7] meson: Remove `gles_headless_enabled`
diff mbox series

Message ID 20260129164032.1380169-4-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1,1/7] meson: Drop unnecessary egl, gles feature defines
Related show

Commit Message

Barnabás Pőcze Jan. 29, 2026, 4:40 p.m. UTC
Use the `mesa_works` variable instead to simplify, the two variables
have the same value.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/libcamera/meson.build              | 6 ------
 src/libcamera/software_isp/meson.build | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

Comments

Milan Zamazal Jan. 30, 2026, 1:16 p.m. UTC | #1
Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:

> Use the `mesa_works` variable instead to simplify, the two variables
> have the same value.
>
> 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 | 4 ++--
>  2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 28ce93de6..06ed34101 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -74,12 +74,6 @@ mesa_works = cc.check_header('EGL/egl.h', required: false)
>  libegl = dependency('egl', required : false)
>  libglesv2 = dependency('glesv2', required : false)
>  
> -if mesa_works
> -    gles_headless_enabled = true
> -else
> -    gles_headless_enabled = false
> -endif
> -
>  subdir('base')
>  subdir('converter')
>  subdir('ipa')
> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
> index 4c61909fd..118d3f92f 100644
> --- a/src/libcamera/software_isp/meson.build
> +++ b/src/libcamera/software_isp/meson.build
> @@ -2,7 +2,7 @@
>  
>  softisp_enabled = pipelines.contains('simple')
>  summary({'SoftISP support' : softisp_enabled}, section : 'Configuration')
> -summary({'SoftISP GPU acceleration' : gles_headless_enabled}, section : 'Configuration')
> +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
>  
>  if not softisp_enabled
>      subdir_done()
> @@ -16,7 +16,7 @@ libcamera_internal_sources += files([
>      'swstats_cpu.cpp',
>  ])
>  
> -if gles_headless_enabled
> +if mesa_works
>      config_h.set('HAVE_DEBAYER_EGL', 1)
>      libcamera_internal_sources += files([
>          '../egl.cpp',
Laurent Pinchart Jan. 30, 2026, 2:03 p.m. UTC | #2
On Thu, Jan 29, 2026 at 05:40:29PM +0100, Barnabás Pőcze wrote:
> Use the `mesa_works` variable instead to simplify, the two variables
> have the same value.

mesa_works is a weird name. I'd rename it to gles_enabled or
gles_available. This can be done on top.

> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/meson.build              | 6 ------
>  src/libcamera/software_isp/meson.build | 4 ++--
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 28ce93de6..06ed34101 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -74,12 +74,6 @@ mesa_works = cc.check_header('EGL/egl.h', required: false)
>  libegl = dependency('egl', required : false)
>  libglesv2 = dependency('glesv2', required : false)
>  
> -if mesa_works
> -    gles_headless_enabled = true
> -else
> -    gles_headless_enabled = false
> -endif
> -
>  subdir('base')
>  subdir('converter')
>  subdir('ipa')
> diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
> index 4c61909fd..118d3f92f 100644
> --- a/src/libcamera/software_isp/meson.build
> +++ b/src/libcamera/software_isp/meson.build
> @@ -2,7 +2,7 @@
>  
>  softisp_enabled = pipelines.contains('simple')
>  summary({'SoftISP support' : softisp_enabled}, section : 'Configuration')
> -summary({'SoftISP GPU acceleration' : gles_headless_enabled}, section : 'Configuration')
> +summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
>  
>  if not softisp_enabled
>      subdir_done()
> @@ -16,7 +16,7 @@ libcamera_internal_sources += files([
>      'swstats_cpu.cpp',
>  ])
>  
> -if gles_headless_enabled
> +if mesa_works
>      config_h.set('HAVE_DEBAYER_EGL', 1)
>      libcamera_internal_sources += files([
>          '../egl.cpp',

Patch
diff mbox series

diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 28ce93de6..06ed34101 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -74,12 +74,6 @@  mesa_works = cc.check_header('EGL/egl.h', required: false)
 libegl = dependency('egl', required : false)
 libglesv2 = dependency('glesv2', required : false)
 
-if mesa_works
-    gles_headless_enabled = true
-else
-    gles_headless_enabled = false
-endif
-
 subdir('base')
 subdir('converter')
 subdir('ipa')
diff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build
index 4c61909fd..118d3f92f 100644
--- a/src/libcamera/software_isp/meson.build
+++ b/src/libcamera/software_isp/meson.build
@@ -2,7 +2,7 @@ 
 
 softisp_enabled = pipelines.contains('simple')
 summary({'SoftISP support' : softisp_enabled}, section : 'Configuration')
-summary({'SoftISP GPU acceleration' : gles_headless_enabled}, section : 'Configuration')
+summary({'SoftISP GPU acceleration' : mesa_works}, section : 'Configuration')
 
 if not softisp_enabled
     subdir_done()
@@ -16,7 +16,7 @@  libcamera_internal_sources += files([
     'swstats_cpu.cpp',
 ])
 
-if gles_headless_enabled
+if mesa_works
     config_h.set('HAVE_DEBAYER_EGL', 1)
     libcamera_internal_sources += files([
         '../egl.cpp',