loader: Move the wayland protocol build into loader
We can hang this here instead of off wayland-drm's build. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
This commit is contained in:
@@ -4,6 +4,33 @@
|
||||
inc_loader = include_directories('.')
|
||||
|
||||
if with_platform_wayland
|
||||
wp_dir = dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir', internal : 'pkgdatadir')
|
||||
wp_protos = {
|
||||
'fifo-v1': 'staging/fifo/fifo-v1.xml',
|
||||
'commit-timing-v1': 'staging/commit-timing/commit-timing-v1.xml',
|
||||
'linux-dmabuf-unstable-v1': 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
|
||||
'presentation-time': 'stable/presentation-time/presentation-time.xml',
|
||||
'tearing-control-v1': 'staging/tearing-control/tearing-control-v1.xml',
|
||||
'linux-drm-syncobj-v1': 'staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml',
|
||||
'color-management-v1': 'staging/color-management/color-management-v1.xml',
|
||||
}
|
||||
wp_files = {}
|
||||
foreach name, xml : wp_protos
|
||||
code = custom_target(
|
||||
name + '-protocol.c',
|
||||
input : files(join_paths(wp_dir, xml)),
|
||||
output : name + '-protocol.c',
|
||||
command : [prog_wl_scanner, wl_scanner_arg, '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
header = custom_target(
|
||||
name + '-client-protocol.h',
|
||||
input : files(join_paths(wp_dir, xml)),
|
||||
output : name + '-client-protocol.h',
|
||||
command : [prog_wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
wp_files += { name: [code, header] }
|
||||
endforeach
|
||||
|
||||
libloader_wayland_helper = static_library(
|
||||
'loader_wayland_helper',
|
||||
'loader_wayland_helper.c',
|
||||
|
||||
Reference in New Issue
Block a user