diff --git a/meson.build b/meson.build index fe3a7f334f8..686d5225deb 100644 --- a/meson.build +++ b/meson.build @@ -445,11 +445,10 @@ with_gbm = get_option('gbm') \ .allowed() with_xlib_lease = get_option('xlib-lease') \ - .require(with_platform_x11 and system_has_kms_drm, error_message : 'xlib-lease requires X11 and KMS/DRM support') \ + .require(with_platform_x11 and (system_has_kms_drm or with_dri_platform == 'apple'), error_message : 'xlib-lease requires X11 and KMS/DRM support') \ .allowed() with_egl = get_option('egl') \ - .require(host_machine.system() != 'darwin', error_message : 'EGL not supported on MacOS') \ .require(with_platform_windows or with_platform_haiku or with_dri or with_platform_android, error_message : 'EGL requires DRI, Haiku, Windows or Android') \ .require(with_shared_glapi, error_message : 'EGL requires shared-glapi') \ .require(with_glx != 'xlib', error_message :'EGL requires DRI, but GLX is being built with xlib support') \ @@ -559,7 +558,7 @@ if with_vulkan_icd_dir == '' endif # GNU/Hurd includes egl_dri2, without drm. -with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or +with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or with_dri_platform == 'apple' or host_machine.system() == 'gnu') with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed() @@ -2068,6 +2067,7 @@ if with_platform_x11 pre_args += '-DXCB_KEYSYMS_AVAILABLE' endif dep_x11_xcb = dependency('x11-xcb') + dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8') if with_dri_platform == 'drm' and not dep_libdrm.found() error('libdrm required for gallium video statetrackers when using x11') endif diff --git a/src/glx/meson.build b/src/glx/meson.build index 1a5e9833956..1d4180f94e2 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -78,7 +78,7 @@ extra_deps_libgl = [] extra_ld_args_libgl = [] # dri2 -if with_dri_platform == 'drm' and dep_libdrm.found() +if (with_dri_platform == 'drm' and dep_libdrm.found()) or with_dri_platform == 'apple' files_libglx += files( 'dri2.c', 'dri2_glx.c', @@ -136,7 +136,7 @@ libglx = static_library( ], dependencies : [ idep_mesautil, idep_xmlconfig, - dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_xext, dep_glvnd, dep_xxf86vm, dep_xshmfence + dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_xext, dep_glvnd, dep_xxf86vm, dep_xshmfence, dep_xfixes, ], )