From fd23ccae2b3d874a006f712a3dd0cc9efd12fad2 Mon Sep 17 00:00:00 2001
From: Enne Eziarc <flussence+git@flussence.eu>
Date: Mon, 30 Nov 2020 12:28:03 +0000
Subject: [PATCH] Make QtMultimedia output optional

Qt is usually installed for the GUI bits. Requiring the Multimedia
module as a side effect of enabling Qt, when most people will use
alsa/pulse/etc directly, is somewhat pointless.
---
 meson_options.txt | 2 ++
 src/meson.build   | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meson_options.txt b/meson_options.txt
index 27ae14b8c..5bc84ac1b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -60,6 +60,8 @@ option('filewriter-ogg', type: 'boolean', value: true,
        description: 'Whether FileWriter (transcoding) OGG support is enabled')
 option('filewriter-flac', type: 'boolean', value: true,
        description: 'Whether FileWriter (transcoding) FLAC support is enabled')
+option('qtaudio', type: 'boolean', value: true,
+       description: 'Whether QtMultimedia support is enabled')
 
 # general plugins
 option('songchange', type: 'boolean', value: true,
diff --git a/src/meson.build b/src/meson.build
index c0be32639..134d84389 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -89,7 +89,9 @@ if get_option('qt')
   subdir('delete-files')
   subdir('skins-data')
 
-  subdir('qtaudio')
+  if get_option('qtaudio')
+    subdir('qtaudio')
+  endif
 
   if get_option('vumeter')
     subdir('vumeter-qt')
-- 
2.29.2

