On 23/03/21 16:51, Philippe Mathieu-Daudé wrote:
> As we want to conditionally install blob files,
> declare them using a source set.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> pc-bios/meson.build | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index f2b32598af7..1c4074bcb0d 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -1,3 +1,5 @@
> +blobs_ss = ss.source_set()
> +
> if install_edk2_blobs
> fds = [
> 'edk2-aarch64-code.fd',
> @@ -22,7 +24,7 @@
> endforeach
> endif
>
> -blobs = files(
> +blobs_ss.add(files(
> 'bios.bin',
> 'bios-256k.bin',
> 'bios-microvm.bin',
> @@ -81,10 +83,12 @@
> 'opensbi-riscv32-generic-fw_dynamic.elf',
> 'opensbi-riscv64-generic-fw_dynamic.elf',
> 'npcm7xx_bootrom.bin',
> -)
> +))
> +
> +blobs_ss = blobs_ss.apply(config_host, strict: false)
>
> if get_option('install_blobs')
> - install_data(blobs, install_dir: qemu_datadir)
> + install_data(blobs_ss.sources(), install_dir: qemu_datadir)
> endif
>
> subdir('descriptors')
>
If you have no conditions, you can also use an array.
Paolo