aboutsummaryrefslogtreecommitdiff
path: root/audio/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-17 12:47:55 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:21 -0400
commit478e943f515bffb712ff65a85b5db36c90a2f5e7 (patch)
tree500e8167a2136e49e7a17ef19f5ab518d8cdbeb8 /audio/meson.build
parenta2ce7dbd917a18408cf4bfd132578b46c2752a72 (diff)
meson: convert audio directory to Meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'audio/meson.build')
-rw-r--r--audio/meson.build30
1 files changed, 30 insertions, 0 deletions
diff --git a/audio/meson.build b/audio/meson.build
new file mode 100644
index 0000000000..15c06ba045
--- /dev/null
+++ b/audio/meson.build
@@ -0,0 +1,30 @@
+softmmu_ss.add(files(
+ 'audio.c',
+ 'audio_legacy.c',
+ 'mixeng.c',
+ 'noaudio.c',
+ 'wavaudio.c',
+ 'wavcapture.c',
+))
+
+softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spiceaudio.c'))
+softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c'))
+softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsoundaudio.c'))
+softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_int.c'))
+
+audio_modules = {}
+foreach m : [
+ ['CONFIG_AUDIO_ALSA', 'alsa', alsa, 'alsaaudio.c'],
+ ['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'],
+ ['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'],
+ ['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'],
+ ['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c']
+]
+ if config_host.has_key(m[0])
+ module_ss = ss.source_set()
+ module_ss.add(when: m[2], if_true: files(m[3]))
+ audio_modules += {m[1] : module_ss}
+ endif
+endforeach
+
+modules += {'audio': audio_modules}