From d8c8a7fb6efb1526ea3780b4bec1b350c570baea Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 12 Dec 2024 12:27:49 -0600 Subject: [PATCH] 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 Part-of: --- src/egl/wayland/wayland-drm/meson.build | 35 ------------------------- src/loader/meson.build | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 35 deletions(-) diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build index d3b6c15ddd2..99caf102d62 100644 --- a/src/egl/wayland/wayland-drm/meson.build +++ b/src/egl/wayland/wayland-drm/meson.build @@ -31,38 +31,3 @@ libwayland_drm = static_library( dependencies : [dep_wayland_server], build_by_default : false, ) - -# linux-dmabuf isn't part of wayland-drm, but this happens to be the only -# place which is a) guaranteed to be built when building either or both -# of EGL and Vulkan WSI, and b) guaranteed to be included before both, -# so the targets are actually defined by the time the files come to be -# used. -# -# Moving these to a src/wsi/ was suggested but shot down, so put these -# here for now as the maybe-least-bad solution. -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 diff --git a/src/loader/meson.build b/src/loader/meson.build index 1eded70b29b..283d240ae6d 100644 --- a/src/loader/meson.build +++ b/src/loader/meson.build @@ -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',