meson: Make bluez optional

I can't promise that the logic is *exactly* the same as the logic
currently in use with the autotools, but it seems correct to me.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-19 17:40:06 +07:00 committed by Arun Raghavan
parent d984da3fea
commit ab5e5fe5c6
4 changed files with 37 additions and 29 deletions

View file

@ -8,12 +8,13 @@ libbluez5_util_headers = [
'rtp.h',
]
if bluez_dep.found()
if get_option('bluez5-native-headset')
libbluez5_util_sources += [ 'backend-native.c' ]
endif
# TODO This should be optional
libbluez5_util_sources += [ 'backend-ofono.c' ]
if get_option('bluez5-ofono-headset')
libbluez5_util_sources += [ 'backend-ofono.c' ]
endif
libbluez5_util = shared_library('libbluez5_util',
libbluez5_util_sources,