mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 05:50:04 +01:00
meson: Build Xwayland unconditionally
And simplify build_glamor logic, we don't need the separate glamor_option variable anymore. (cherry picked from commitfdc61c5a3c) (cherry picked from commit274d54d1c3)
This commit is contained in:
parent
93fde076e0
commit
cfba10c7c4
2 changed files with 25 additions and 52 deletions
71
meson.build
71
meson.build
|
|
@ -162,44 +162,29 @@ else
|
||||||
default_font_path = dfp
|
default_font_path = dfp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
glamor_option = get_option('glamor')
|
build_glamor = get_option('glamor')
|
||||||
|
|
||||||
with_dtrace = get_option('dtrace')
|
with_dtrace = get_option('dtrace')
|
||||||
if with_dtrace
|
if with_dtrace
|
||||||
dtrace = find_program('dtrace', required: true)
|
dtrace = find_program('dtrace', required: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libxcvt_dep = dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: build_xorg)
|
build_xwayland = true
|
||||||
build_xwayland = false
|
|
||||||
if (host_machine.system() != 'darwin' and
|
|
||||||
host_machine.system() != 'windows' and
|
|
||||||
get_option('xwayland') != 'false')
|
|
||||||
xwayland_required = get_option('xwayland') == 'true'
|
|
||||||
build_glamor = glamor_option == 'true' or glamor_option == 'auto'
|
|
||||||
|
|
||||||
xwayland_path = get_option('xwayland-path')
|
xwayland_path = get_option('xwayland-path')
|
||||||
if (xwayland_path == '')
|
if (xwayland_path == '')
|
||||||
xwayland_path = join_paths(get_option('prefix'), get_option('bindir'))
|
xwayland_path = join_paths(get_option('prefix'), get_option('bindir'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
xwayland_dep = [
|
xwayland_dep = [
|
||||||
dependency('wayland-client', version: wayland_req, required: xwayland_required),
|
dependency('wayland-client', version: wayland_req, required: true),
|
||||||
dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
|
dependency('wayland-protocols', version: wayland_protocols_req, required: true),
|
||||||
dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: xwayland_required),
|
dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: true),
|
||||||
]
|
]
|
||||||
|
|
||||||
if build_glamor
|
if build_glamor
|
||||||
xwayland_dep += dependency('libdrm', version: libdrm_req, required: xwayland_required)
|
xwayland_dep += dependency('libdrm', version: libdrm_req, required: true)
|
||||||
xwayland_dep += dependency('epoxy', required: xwayland_required)
|
xwayland_dep += dependency('epoxy', required: true)
|
||||||
endif
|
|
||||||
|
|
||||||
build_xwayland = true
|
|
||||||
# check for all the deps being found, to handle 'auto' mode.
|
|
||||||
foreach d: xwayland_dep
|
|
||||||
if not d.found()
|
|
||||||
build_xwayland = false
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('ipv6') == 'auto'
|
if get_option('ipv6') == 'auto'
|
||||||
|
|
@ -208,12 +193,6 @@ else
|
||||||
build_ipv6 = get_option('ipv6') == 'true'
|
build_ipv6 = get_option('ipv6') == 'true'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if glamor_option == 'auto'
|
|
||||||
build_glamor = build_xwayland
|
|
||||||
else
|
|
||||||
build_glamor = glamor_option == 'true'
|
|
||||||
endif
|
|
||||||
|
|
||||||
gbm_dep = dependency('', required: false)
|
gbm_dep = dependency('', required: false)
|
||||||
epoxy_dep = dependency('', required: false)
|
epoxy_dep = dependency('', required: false)
|
||||||
if build_glamor
|
if build_glamor
|
||||||
|
|
@ -221,23 +200,19 @@ if build_glamor
|
||||||
epoxy_dep = dependency('epoxy', required: false)
|
epoxy_dep = dependency('epoxy', required: false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if build_xwayland
|
libdecor_dep = dependency('libdecor-0', required: false)
|
||||||
libdecor_dep = dependency('libdecor-0', required: false)
|
libdecor_option = get_option('libdecor')
|
||||||
libdecor_option = get_option('libdecor')
|
if libdecor_option == 'auto'
|
||||||
if libdecor_option == 'auto'
|
have_libdecor = libdecor_dep.found()
|
||||||
have_libdecor = libdecor_dep.found()
|
|
||||||
else
|
|
||||||
have_libdecor = libdecor_option == 'true'
|
|
||||||
if have_libdecor and not libdecor_dep.found()
|
|
||||||
error('libdecor support requested but not found')
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
have_libdecor = false
|
have_libdecor = libdecor_option == 'true'
|
||||||
|
if have_libdecor and not libdecor_dep.found()
|
||||||
|
error('libdecor support requested but not found')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
eglstream_option = get_option('xwayland_eglstream')
|
eglstream_option = get_option('xwayland_eglstream')
|
||||||
if build_xwayland and build_glamor
|
if build_glamor
|
||||||
eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
|
eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
|
||||||
if eglstream_option == 'auto'
|
if eglstream_option == 'auto'
|
||||||
build_eglstream = eglstream_dep.found()
|
build_eglstream = eglstream_dep.found()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
option('xwayland', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
|
option('glamor', type: 'boolean', value: true,
|
||||||
description: 'Enable Xwayland X server')
|
description: 'Enable glamor (default yes)')
|
||||||
option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
|
|
||||||
description: 'Enable glamor (default yes for Xwayland builds)')
|
|
||||||
option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'],
|
option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'],
|
||||||
value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland')
|
value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland')
|
||||||
option('xvfb', type: 'boolean', value: true,
|
option('xvfb', type: 'boolean', value: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue