6868
6969bintoc_command = [bintoc, ' @PLAINNAME@.spv' , ' @PLAINNAME@_spv' , ' @OUTPUT@' ]
7070
71- vkquake_pak_path = join_paths (meson .project_source_root(), ' Quake ' , ' vkquake.pak' )
71+ vkquake_pak_path = join_paths (' @OUTPUT@ ' , ' vkquake.pak' )
7272
7373vq_pak_path = join_paths (meson .project_source_root(), ' Misc' , ' vq_pak' )
7474mkpak_toc_file = join_paths (vq_pak_path, ' vq_pak_contents.txt' )
@@ -79,9 +79,11 @@ run_mkpak = custom_target('run-mkpak',
7979 output : ' vkquake.pak' ,
8080 command : mkpak_command)
8181
82- embedded_pak_path = join_paths (meson .project_source_root(), ' Quake' , ' embedded_pak.c' )
82+ # Write the embedded pak into the build output (@OUTPUT@) so Meson can track it.
83+ # this as no special dependencies, so actually can generated anywhere
84+ embedded_pak_path = join_paths (' @OUTPUT@' , ' embedded_pak.c' )
8385
84- bintoc_compress_command = [bintoc, ' -c' , vkquake_pak_path,' vkquake.pak' , embedded_pak_path]
86+ bintoc_compress_command = [bintoc, ' -c' , vkquake_pak_path, ' vkquake.pak' , embedded_pak_path]
8587
8688run_generate_embedded_pak = custom_target (' run-embed_vkquake_pak' ,
8789 output : ' embedded_pak.c' ,
@@ -180,7 +182,7 @@ srcs = [
180182 ' Quake/wad.c' ,
181183 ' Quake/world.c' ,
182184 ' Quake/hash_map.c' ,
183- ' Quake/embedded_pak.c ' ,
185+ run_generate_embedded_pak ,
184186]
185187
186188cflags = [' -Wall' , ' -Wno-trigraphs' , ' -Werror' , ' -std=gnu11' ]
0 commit comments