build: Include the right things
authorBenjamin Otte <otte@redhat.com>
Mon, 3 Jul 2023 02:45:20 +0000 (04:45 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 3 Jul 2023 20:02:44 +0000 (22:02 +0200)
If we build our own targets, we need to include those.

This is only relevant when adding new shaders because meson will
complain that the (unused) sources don't exist as it tries to include
those.
And that will make the build.ninja file not be generated which would
have build those shaders and would have allowed to copy them into the
sources.

Note that this makes builds with glslc not care about all the shader
files being included with the sources, but we have CI to check that.

gsk/vulkan/resources/meson.build

index 3e5b00dafabe702a1206608dc5098d0b869611dd..5075f97b8323608fb6c56258877c867ffd1ce4a8 100644 (file)
@@ -87,8 +87,10 @@ foreach shader: gsk_private_vulkan_shaders
                                                    '-o', '@OUTPUT@'
                                                  ])
     gsk_private_vulkan_compiled_shaders_deps += [compiled_shader, compiled_clip_shader, compiled_clip_rounded_shader]
+    gsk_private_vulkan_compiled_shaders += [spv_shader, clip_spv_shader, clip_rounded_spv_shader]
+  else
+    gsk_private_vulkan_compiled_shaders += files(spv_shader, clip_spv_shader, clip_rounded_spv_shader)
   endif
-  gsk_private_vulkan_compiled_shaders += files(spv_shader, clip_spv_shader, clip_rounded_spv_shader)
 endforeach
 
 foreach shader: gsk_private_vulkan_vertex_shaders