lib/upnp/meson.build: auto-disable UPnP without CURL/expat

This commit is contained in:
Max Kellermann 2021-05-19 14:37:09 +02:00
parent 34f636ffc3
commit e016cc8940
1 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,15 @@
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())