Commit 619cfb63 authored by Thomas Weißschuh's avatar Thomas Weißschuh
Browse files

bluetooth: add meson support for aptx codecs

parent 8c1a6eec
......@@ -634,6 +634,14 @@ if get_option('bluez5')
endif
endif
bluez5_aptx_feature = get_option('bluez5-aptx')
bluez5_aptx_dep = cc.find_library('openaptx', required : bluez5_aptx_feature)
bluez5_aptx = cc.has_header_symbol('openaptx.h', 'aptx_init', required : bluez5_aptx_feature) \
and bluez5_aptx_dep.found()
if bluez5_aptx
cdata.set('HAVE_OPENAPTX', 1)
endif
fftw_dep = dependency('fftw3f', required : get_option('fftw'))
if fftw_dep.found()
cdata.set('HAVE_FFTW', 1)
......@@ -815,6 +823,7 @@ summary = [
' Enable BlueZ 5: @0@'.format(get_option('bluez5')),
' Enable native headsets: @0@'.format(get_option('bluez5-native-headset')),
' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')),
' Enable aptX+aptXHD codecs: @0@'.format(bluez5_aptx),
'Enable udev: @0@'.format(udev_dep.found()),
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
'Enable systemd: @0@'.format(libsystemd_dep.found()),
......
......@@ -75,6 +75,9 @@ option('avahi',
option('bluez5',
type : 'boolean', value : 'true',
description : 'Optional BlueZ 5 support')
option('bluez5-aptx',
type : 'feature', value : 'auto',
description : 'Optional aptX support')
option('bluez5-native-headset',
type : 'boolean',
description : 'Optional native headset backend support (BlueZ 5)')
......
......@@ -21,13 +21,17 @@ if get_option('bluez5-ofono-headset')
libbluez5_util_sources += [ 'backend-ofono.c' ]
endif
if bluez5_aptx
libbluez5_util_sources += [ 'a2dp-codec-aptx.c' ]
endif
libbluez5_util = shared_library('bluez5-util',
libbluez5_util_sources,
libbluez5_util_headers,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep, libintl_dep],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep, libintl_dep, bluez5_aptx_dep],
install : true,
install_rpath : privlibdir,
install_dir : modlibexecdir,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment