build: fix meson build error when without x11.

meson -Dwith_x11=no build_dir
can not success build the project because the glx is still enabled.
We need to disable GLX when X11 is disabled.
This commit is contained in:
He Junyan 2020-02-21 00:50:47 +08:00 committed by GStreamer Merge Bot
parent 17d82e14e7
commit 7e7ab6e1f8

View file

@ -113,9 +113,9 @@ USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no'
USE_WAYLAND = libva_wayland_dep.found() and wayland_client_dep.found() and wayland_protocols_dep.found() and wayland_scanner_bin.found() and get_option('with_wayland') != 'no'
USE_X11 = libva_x11_dep.found() and x11_dep.found() and get_option('with_x11') != 'no'
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no' and USE_X11
if not (USE_DRM or USE_X11 or USE_EGL or USE_GLX or USE_WAYLAND)
error('No renderer API found (it is requried either DRM, X11 and/or WAYLAND)')