meson: use summary()
Make use of mesons summary() to create and align the configuration summary. Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
This commit is contained in:

committed by
Marge Bot

parent
e8c8a94c2e
commit
6c0dc0b2a7
115
meson.build
115
meson.build
@@ -2087,42 +2087,35 @@ subdir('src')
|
|||||||
|
|
||||||
meson.add_devenv(devenv)
|
meson.add_devenv(devenv)
|
||||||
|
|
||||||
lines = ['',
|
summary_lines = {
|
||||||
'prefix: ' + get_option('prefix'),
|
'prefix': get_option('prefix'),
|
||||||
'libdir: ' + get_option('libdir'),
|
'libdir': get_option('libdir'),
|
||||||
'includedir: ' + get_option('includedir'),
|
'includedir': get_option('includedir'),
|
||||||
'',
|
|
||||||
'OpenGL: @0@ (ES1: @1@ ES2: @2@)'.format(with_opengl ? 'yes' : 'no',
|
|
||||||
with_gles1 ? 'yes' : 'no',
|
|
||||||
with_gles2 ? 'yes' : 'no'),
|
|
||||||
]
|
|
||||||
|
|
||||||
if with_osmesa
|
'OpenGL': with_opengl,
|
||||||
lines += ''
|
'ES1': with_gles1,
|
||||||
lines += 'OSMesa: lib' + osmesa_lib_name
|
'ES2': with_gles2,
|
||||||
else
|
|
||||||
lines += 'OSMesa: no'
|
'OSMesa': with_osmesa ? 'lib' + osmesa_lib_name : false}
|
||||||
endif
|
|
||||||
|
|
||||||
if with_dri
|
if with_dri
|
||||||
lines += ''
|
summary_lines += {
|
||||||
lines += 'DRI platform: ' + with_dri_platform
|
'DRI platform': with_dri_platform,
|
||||||
lines += 'DRI driver dir: ' + dri_drivers_path
|
'DRI driver dir': dri_drivers_path
|
||||||
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_glx != 'disabled'
|
if with_glx == 'disabled'
|
||||||
lines += ''
|
summary_lines += {'GLX': false}
|
||||||
if with_glx == 'dri'
|
elif with_glx == 'dri'
|
||||||
lines += 'GLX: DRI-based'
|
summary_lines += {'GLX': 'DRI-based'}
|
||||||
elif with_glx == 'xlib'
|
elif with_glx == 'xlib'
|
||||||
lines += 'GLX: Xlib-based'
|
summary_lines += {'GLX': 'Xlib-based'}
|
||||||
else
|
else
|
||||||
lines += 'GLX: ' + with_glx
|
summary_lines += {'GLX': with_glx}
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lines += ''
|
summary_lines += {'EGL': with_egl}
|
||||||
lines += 'EGL: ' + (with_egl ? 'yes' : 'no')
|
|
||||||
if with_egl
|
if with_egl
|
||||||
egl_drivers = []
|
egl_drivers = []
|
||||||
if with_dri
|
if with_dri
|
||||||
@@ -2134,42 +2127,41 @@ if with_egl
|
|||||||
if with_platform_windows
|
if with_platform_windows
|
||||||
egl_drivers += 'builtin:wgl'
|
egl_drivers += 'builtin:wgl'
|
||||||
endif
|
endif
|
||||||
lines += 'EGL drivers: ' + ' '.join(egl_drivers)
|
summary_lines += {'EGL drivers': egl_drivers}
|
||||||
endif
|
endif
|
||||||
if with_egl or with_any_vk
|
if with_egl or with_any_vk
|
||||||
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
|
_platforms += 'surfaceless'
|
||||||
endif
|
if with_gbm and not with_platform_android
|
||||||
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
|
_platforms += 'drm'
|
||||||
if with_gbm
|
endif
|
||||||
lines += 'GBM backends path: ' + gbm_backends_path
|
summary_lines += {'EGL/Vulkan/VL platforms': _platforms}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lines += ''
|
summary_lines += {'GBM': with_gbm}
|
||||||
lines += 'Video Codecs: ' + ' '.join(_codecs)
|
if with_gbm
|
||||||
lines += ''
|
summary_lines += {'GBM backends path': gbm_backends_path}
|
||||||
|
endif
|
||||||
|
|
||||||
|
summary_lines += {'Vulkan drivers': _vulkan_drivers.length() != 0 ? _vulkan_drivers : false }
|
||||||
|
summary_lines += {'Video Codecs': _codecs.length() != 0 ? _codecs : false }
|
||||||
|
|
||||||
if with_any_vk
|
if with_any_vk
|
||||||
lines += 'Vulkan drivers: ' + ' '.join(_vulkan_drivers)
|
summary_lines += {'Vulkan ICD dir': with_vulkan_icd_dir}
|
||||||
lines += 'Vulkan ICD dir: ' + with_vulkan_icd_dir
|
|
||||||
if with_any_vulkan_layers
|
if with_any_vulkan_layers
|
||||||
lines += 'Vulkan layers: ' + ' '.join(get_option('vulkan-layers'))
|
summary_lines += {'Vulkan layers': get_option('vulkan-layers')}
|
||||||
endif
|
endif
|
||||||
lines += 'Vulkan Intel Ray Tracing: ' + (with_intel_vk_rt ? 'yes' : 'no')
|
summary_lines += {'Vulkan Intel Ray Tracing': with_intel_vk_rt}
|
||||||
else
|
|
||||||
lines += 'Vulkan drivers: no'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lines += ''
|
summary_lines += {'llvm': with_llvm}
|
||||||
if with_llvm
|
if with_llvm
|
||||||
lines += 'llvm: yes'
|
summary_lines += {'llvm-version': dep_llvm.version()}
|
||||||
lines += 'llvm-version: ' + dep_llvm.version()
|
|
||||||
else
|
|
||||||
lines += 'llvm: no'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lines += ''
|
summary_lines += {'Gallium': with_gallium}
|
||||||
if with_gallium
|
if with_gallium
|
||||||
lines += 'Gallium drivers: ' + ' '.join(gallium_drivers)
|
summary_lines += {'Gallium drivers': gallium_drivers}
|
||||||
|
|
||||||
gallium_st = ['mesa']
|
gallium_st = ['mesa']
|
||||||
if with_gallium_xa
|
if with_gallium_xa
|
||||||
gallium_st += 'xa'
|
gallium_st += 'xa'
|
||||||
@@ -2189,23 +2181,14 @@ if with_gallium
|
|||||||
if with_gallium_opencl
|
if with_gallium_opencl
|
||||||
gallium_st += 'clover'
|
gallium_st += 'clover'
|
||||||
endif
|
endif
|
||||||
lines += 'Gallium st: ' + ' '.join(gallium_st)
|
summary_lines += {'Gallium st': gallium_st}
|
||||||
else
|
|
||||||
lines += 'Gallium: no'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lines += 'HUD lmsensors: ' + (dep_lmsensors.found() ? 'yes' : 'no')
|
summary_lines += {'HUD lmsensors': dep_lmsensors.found()}
|
||||||
|
summary_lines += {'Shared-glapi': with_shared_glapi}
|
||||||
|
|
||||||
lines += ''
|
summary_lines += {'Perfetto': with_perfetto}
|
||||||
lines += 'Shared-glapi: ' + (with_shared_glapi ? 'yes' : 'no')
|
|
||||||
|
|
||||||
lines += ''
|
|
||||||
lines += 'Perfetto: ' + (with_perfetto ? 'yes' : 'no')
|
|
||||||
if with_any_datasource
|
if with_any_datasource
|
||||||
lines += 'Perfetto ds: ' + ' '.join(with_datasources)
|
summary_lines += {'Perfetto ds': with_datasources}
|
||||||
endif
|
endif
|
||||||
|
summary(summary_lines, section: 'Configuration summary', bool_yn: true, list_sep: ' ')
|
||||||
|
|
||||||
indent = ' '
|
|
||||||
summary = indent + ('\n' + indent).join(lines)
|
|
||||||
message('Configuration summary:\n@0@\n'.format(summary))
|
|
||||||
|
Reference in New Issue
Block a user