diff --git a/meson.build b/meson.build index 08874940f3166d3dc380a2765b6179d54f21feba..015bc9745739976eaaf7355d4b86ab2cd39763a7 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index fd9958f87a885959a9a1aea9b2903445cb108b09..67fabb9473b1e602d9e562a8ec32eb6c74044980 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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', diff --git a/src/egl/main/50_mesa.json b/src/egl/main/50_mesa.json index 8aaaa100ffa5134672c27af08cbf33e77984602c..5f9c18aad6e07e12bac75c390989c5c01f9f6034 100644 --- a/src/egl/main/50_mesa.json +++ b/src/egl/main/50_mesa.json @@ -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" } } diff --git a/src/egl/meson.build b/src/egl/meson.build index 7a3fcdca157b569daff1929237580b279479eba0..599a66706b7ab6461e49f46934283be31023ad88 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -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 diff --git a/src/glx/meson.build b/src/glx/meson.build index a7ccd98357f5838ff7e4ef6e0505128edd1259f3..8ee0d009b4f5806de22a208afe7805c2a1dd979f 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -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',