build: Don't use configure_file() when custom_target() works

These two files don't need to be built when configuring, they are only
needed during build.
This commit is contained in:
Benjamin Otte
2023-08-21 05:14:33 +02:00
committed by Matthias Clasen
parent cf644739e4
commit 004f061dca
2 changed files with 8 additions and 12 deletions

View File

@@ -97,10 +97,6 @@ if have_vulkan
endif
gsk_private_vulkan_shaders = []
# This is an odd split because we use configure_file() below to workaround
# a limitation in meson preventing using custom_target() with gnome.compile_resources()
# and that requires file paths, but we also need to have dependencies during development
# on constantly regenerated files.
gsk_private_vulkan_compiled_shaders = []
gsk_private_vulkan_compiled_shaders_deps = []
gsk_private_vulkan_shader_headers = []
@@ -148,7 +144,7 @@ if get_variable('broadway_enabled')
])
endif
gsk_resources_xml = configure_file(output: 'gsk.resources.xml',
gsk_resources_xml = custom_target(output: 'gsk.resources.xml',
input: 'gen-gsk-gresources-xml.py',
command: [
find_program('gen-gsk-gresources-xml.py'),

View File

@@ -93,12 +93,12 @@ foreach shader: gsk_private_vulkan_shaders
endforeach
foreach shader: gsk_private_vulkan_vertex_shaders
shader_header = configure_file(output: '@0@.h'.format(shader),
input: shader,
command: [
find_program('generate-header.py'),
'@INPUT@',
],
capture: true)
shader_header = custom_target(output: '@0@.h'.format(shader),
input: shader,
command: [
find_program('generate-header.py'),
'@INPUT@',
],
capture: true)
gsk_private_vulkan_shader_headers += shader_header
endforeach