mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: turn `glvnd` option into a feature
Makes for nicer code, and allows the next commit. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
This commit is contained in:
parent
3a4a16e9e8
commit
4f25b84b24
|
@ -265,7 +265,7 @@ alpine-build-testing:
|
|||
-D glx=disabled
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D glvnd=false
|
||||
-D glvnd=disabled
|
||||
-D platforms=wayland
|
||||
LLVM_VERSION: "16"
|
||||
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
|
||||
|
@ -305,7 +305,7 @@ fedora-release:
|
|||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D glvnd=true
|
||||
-D glvnd=enabled
|
||||
-D platforms=x11,wayland
|
||||
EXTRA_OPTION: >
|
||||
-D b_lto=true
|
||||
|
@ -540,7 +540,7 @@ debian-clang:
|
|||
-D glx=dri
|
||||
-D gbm=enabled
|
||||
-D egl=enabled
|
||||
-D glvnd=true
|
||||
-D glvnd=enabled
|
||||
-D platforms=x11,wayland
|
||||
GALLIUM_ST: >
|
||||
-D dri3=enabled
|
||||
|
|
|
@ -122,7 +122,7 @@ Building the Code
|
|||
::
|
||||
|
||||
cd $TOP/mesa
|
||||
meson builddir -Dvulkan-drivers= -Dgallium-drivers=svga -Ddri-drivers= -Dglvnd=true -Dglvnd-vendor-name=mesa
|
||||
meson builddir -Dvulkan-drivers= -Dgallium-drivers=svga -Ddri-drivers= -Dglvnd=enabled -Dglvnd-vendor-name=mesa
|
||||
|
||||
meson compile -C builddir
|
||||
sudo meson install -C builddir
|
||||
|
|
24
meson.build
24
meson.build
|
@ -543,20 +543,18 @@ if with_glx != 'disabled'
|
|||
endif
|
||||
endif
|
||||
|
||||
dep_glvnd = null_dep
|
||||
with_glvnd = get_option('glvnd')
|
||||
_glvnd = get_option('glvnd') \
|
||||
.require(not with_platform_windows,
|
||||
error_message: 'glvnd cannot be used on Windows') \
|
||||
.require(with_glx != 'xlib',
|
||||
error_message: 'Cannot build glvnd support for GLX that is not DRI based.') \
|
||||
.require(with_glx != 'disabled' or with_egl,
|
||||
error_message: 'glvnd requires DRI based GLX and/or EGL') \
|
||||
.require(get_option('egl-lib-suffix') == '',
|
||||
error_message: '''EGL lib suffix can't be used with libglvnd''')
|
||||
dep_glvnd = dependency('libglvnd', version : '>= 1.3.2', required : _glvnd)
|
||||
with_glvnd = dep_glvnd.found()
|
||||
if with_glvnd
|
||||
if with_platform_windows
|
||||
error('glvnd cannot be used on Windows')
|
||||
elif with_glx == 'xlib'
|
||||
error('Cannot build glvnd support for GLX that is not DRI based.')
|
||||
elif with_glx == 'disabled' and not with_egl
|
||||
error('glvnd requires DRI based GLX and/or EGL')
|
||||
endif
|
||||
if get_option('egl-lib-suffix') != ''
|
||||
error('''EGL lib suffix can't be used with libglvnd''')
|
||||
endif
|
||||
dep_glvnd = dependency('libglvnd', version : '>= 1.3.2')
|
||||
pre_args += '-DUSE_LIBGLVND=1'
|
||||
endif
|
||||
glvnd_vendor_name = get_option('glvnd-vendor-name')
|
||||
|
|
|
@ -361,8 +361,9 @@ option(
|
|||
|
||||
option(
|
||||
'glvnd',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
type : 'feature',
|
||||
value : 'disabled',
|
||||
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
||||
description : 'Enable GLVND support.'
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue