summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-05-19 14:37:09 +0200
committerMax Kellermann <max@musicpd.org>2021-05-19 14:37:13 +0200
commite016cc894090127c5fe72b009290b4bf4a534363 (patch)
treef75b60254a8a44d88bffd89c83c63c3c9cc32de9
parent34f636ffc31c96194e82a8023b17e3892c0487e4 (diff)
lib/upnp/meson.build: auto-disable UPnP without CURL/expat
-rw-r--r--src/lib/upnp/meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/upnp/meson.build b/src/lib/upnp/meson.build
index bdc248e6c..863f9d4a1 100644
--- a/src/lib/upnp/meson.build
+++ b/src/lib/upnp/meson.build
@@ -1,6 +1,16 @@
upnp_option = get_option('upnp')
if upnp_option == 'auto'
+ if not curl_dep.found()
+ warning('No UPnP because CURL is not enabled')
+ upnp_option = 'disabled'
+ elif not expat_dep.found()
+ warning('No UPnP because expat is not enabled')
+ upnp_option = 'disabled'
+ endif
+endif
+
+if upnp_option == 'auto'
upnp_dep = dependency('libupnp', version: '>= 1.8', required: false)
conf.set('USING_PUPNP', upnp_dep.found())
if not upnp_dep.found()