summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorPaolo Bonzini2021-10-13 11:42:25 +0200
committerPaolo Bonzini2022-02-21 10:35:53 +0100
commited793c2c455e1c376ae271d8acc5ac40221ecfd1 (patch)
treee2866e688d74abc00b27957ffc1b59ec919082d5 /block
parentconfigure, meson: cleanup qemu-ga libraries (diff)
downloadqemu-ed793c2c455e1c376ae271d8acc5ac40221ecfd1.tar.gz
qemu-ed793c2c455e1c376ae271d8acc5ac40221ecfd1.tar.xz
qemu-ed793c2c455e1c376ae271d8acc5ac40221ecfd1.zip
configure, meson: move image format options to meson_options.txt
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/meson.build47
1 files changed, 32 insertions, 15 deletions
diff --git a/block/meson.build b/block/meson.build
index 90dc9983e5..4afde2ebf8 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -45,20 +45,37 @@ block_ss.add(files(
softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
-block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
-block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
-block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
-block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
-block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
-block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
-block_ss.add(when: 'CONFIG_QED', if_true: files(
- 'qed-check.c',
- 'qed-cluster.c',
- 'qed-l2-cache.c',
- 'qed-table.c',
- 'qed.c',
-))
-block_ss.add(when: 'CONFIG_PARALLELS', if_true: files('parallels.c', 'parallels-ext.c'))
+if get_option('qcow1').allowed()
+ block_ss.add(files('qcow.c'))
+endif
+if get_option('vdi').allowed()
+ block_ss.add(files('vdi.c'))
+endif
+if get_option('cloop').allowed()
+ block_ss.add(files('cloop.c'))
+endif
+if get_option('bochs').allowed()
+ block_ss.add(files('bochs.c'))
+endif
+if get_option('vvfat').allowed()
+ block_ss.add(files('vvfat.c'))
+endif
+if get_option('dmg').allowed()
+ block_ss.add(files('dmg.c'))
+endif
+if get_option('qed').allowed()
+ block_ss.add(files(
+ 'qed-check.c',
+ 'qed-cluster.c',
+ 'qed-l2-cache.c',
+ 'qed-table.c',
+ 'qed.c',
+ ))
+endif
+if get_option('parallels').allowed()
+ block_ss.add(files('parallels.c', 'parallels-ext.c'))
+endif
+
block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
@@ -89,7 +106,7 @@ foreach m : [
endforeach
# those are not exactly regular block modules, so treat them apart
-if 'CONFIG_DMG' in config_host
+if get_option('dmg').allowed()
foreach m : [
[liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
[libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']