[Mesa-dev] [PATCH 2/4] meson: move wayland_drm_protocol generation to wayland-drm

Dylan Baker dylan at pnwbakers.com
Wed Oct 18 23:55:08 UTC 2017


These files are needed by both vulkan wayland-wsi and by egl
wayland-wsi, since the XML file is in src/egl/wayland/wayland-drm and we
can include this directory in such a way that it will be loaded before
egl and vulkan this allows us to avoid multiple calls to the same
generator.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 src/egl/wayland/wayland-drm/meson.build | 14 +++++++++++++-
 src/vulkan/wsi/meson.build              | 14 --------------
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build
index 0a94626f287..92adc295531 100644
--- a/src/egl/wayland/wayland-drm/meson.build
+++ b/src/egl/wayland/wayland-drm/meson.build
@@ -18,4 +18,16 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-wayland_drm_xml = files('wayland-drm.xml')
+wayland_drm_protocol_c = custom_target(
+  'wayland-drm-protocol.c',
+  input : 'wayland-drm.xml',
+  output : 'wayland-drm-protocol.c',
+  command : [prog_wl_scanner, 'code', '@INPUT@', '@OUTPUT@'],
+)
+
+wayland_drm_client_protocol_h = custom_target(
+  'wayland-drm-client-protocol.h',
+  input : 'wayland-drm.xml',
+  output : 'wayland-drm-client-protocol.h',
+  command : [prog_wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
+)
diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build
index c42af8e4cde..3aa02d5e63f 100644
--- a/src/vulkan/wsi/meson.build
+++ b/src/vulkan/wsi/meson.build
@@ -18,20 +18,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-wayland_drm_protocol_c = custom_target(
-  'wayland-drm-protocol.c',
-  input : wayland_drm_xml,
-  output : 'wayland-drm-protocol.c',
-  command : [prog_wl_scanner, 'code', '@INPUT@', '@OUTPUT@'],
-)
-
-wayland_drm_client_protocol_h = custom_target(
-  'wayland-drm-client-protocol.h',
-  input : wayland_drm_xml,
-  output : 'wayland-drm-client-protocol.h',
-  command : [prog_wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
-)
-
 vulkan_wsi_args = []
 vulkan_wsi_deps = []
 
-- 
2.14.2



More information about the mesa-dev mailing list