meson: Make the glvnd vendor name configurable
Leave the default as "mesa", but this enables parallel Mesa installs. Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7674>
This commit is contained in:
parent
9a3aaffeb8
commit
df0157dc69
|
@ -478,6 +478,7 @@ if with_glx != 'disabled'
|
|||
endif
|
||||
|
||||
with_glvnd = get_option('glvnd')
|
||||
glvnd_vendor_name = get_option('glvnd-vendor-name')
|
||||
if with_glvnd
|
||||
if with_platform_windows
|
||||
error('glvnd cannot be used on Windows')
|
||||
|
|
|
@ -289,6 +289,12 @@ option(
|
|||
value : 'auto',
|
||||
description : 'Build support for the Microsoft CLC to DXIL compiler'
|
||||
)
|
||||
option(
|
||||
'glvnd-vendor-name',
|
||||
type : 'string',
|
||||
value : 'mesa',
|
||||
description : 'Vendor name string to use for glvnd libraries'
|
||||
)
|
||||
option(
|
||||
'glx-read-only-text',
|
||||
type : 'boolean',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"file_format_version" : "1.0.0",
|
||||
"ICD" : {
|
||||
"library_path" : "libEGL_mesa.so.0"
|
||||
"library_path" : "libEGL_@glvnd_vendor_name@.so.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,13 +144,18 @@ if not with_glvnd
|
|||
egl_lib_name = 'EGL' + get_option('egl-lib-suffix')
|
||||
egl_lib_version = '1.0.0'
|
||||
else
|
||||
egl_lib_name = 'EGL_mesa'
|
||||
egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name)
|
||||
egl_lib_version = '0.0.0'
|
||||
deps_for_egl += dep_glvnd
|
||||
files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
|
||||
files_egl += files('main/eglglvnd.c', 'main/egldispatchstubs.c')
|
||||
install_data(
|
||||
'main/50_mesa.json',
|
||||
glvnd_config = configuration_data()
|
||||
glvnd_config.set('glvnd_vendor_name', get_option('glvnd-vendor-name'))
|
||||
configure_file(
|
||||
configuration: glvnd_config,
|
||||
input : 'main/50_mesa.json',
|
||||
output: '50_@0@.json'.format(glvnd_vendor_name),
|
||||
install : true,
|
||||
install_dir : join_paths(get_option('datadir'), 'glvnd', 'egl_vendor.d')
|
||||
)
|
||||
endif
|
||||
|
|
|
@ -111,7 +111,7 @@ if not with_glvnd
|
|||
gl_lib_name = 'GL'
|
||||
gl_lib_version = '1.2.0'
|
||||
else
|
||||
gl_lib_name = 'GLX_mesa'
|
||||
gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name)
|
||||
gl_lib_version = '0.0.0'
|
||||
files_libglx += files(
|
||||
'g_glxglvnddispatchfuncs.c',
|
||||
|
|
Loading…
Reference in New Issue