diff --git a/meson.build b/meson.build index f9b0438958c..3073570e23f 100644 --- a/meson.build +++ b/meson.build @@ -1928,6 +1928,7 @@ dep_xext = null_dep dep_xfixes = null_dep dep_x11_xcb = null_dep dep_xcb = null_dep +dep_xcb_keysyms = null_dep dep_xcb_glx = null_dep dep_xcb_dri2 = null_dep dep_xcb_dri3 = null_dep @@ -1953,6 +1954,7 @@ if host_machine.cpu_family() == 'x86_64' and cc.get_id() == 'gcc' endif with_dri3_modifiers = false +with_xcb_keysyms = false if with_platform_x11 if with_glx == 'xlib' dep_x11 = dependency('x11') @@ -1970,6 +1972,11 @@ if with_platform_x11 (with_gallium_vdpau or with_gallium_va or with_gallium_omx != 'disabled')) dep_xcb = dependency('xcb') + dep_xcb_keysyms = dependency('xcb-keysyms', required : false) + with_xcb_keysyms = dep_xcb_keysyms.found() + if with_xcb_keysyms + pre_args += '-DXCB_KEYSYMS_AVAILABLE' + endif dep_x11_xcb = dependency('x11-xcb') if with_dri_platform == 'drm' and not dep_libdrm.found() error('libdrm required for gallium video statetrackers when using x11') diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build index eaa44547273..4202d700663 100644 --- a/src/vulkan/meson.build +++ b/src/vulkan/meson.build @@ -63,6 +63,9 @@ if with_platform_x11 ] vulkan_wsi_list += '-DVK_USE_PLATFORM_XCB_KHR' vulkan_wsi_list += '-DVK_USE_PLATFORM_XLIB_KHR' + if with_xcb_keysyms + vulkan_wsi_deps += dep_xcb_keysyms + endif endif if with_platform_wayland vulkan_wsi_deps += dep_wayland_client