Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Add cmake options OFONO_HEADSET, NATIVE_HEADSET; Close #58
Browse files Browse the repository at this point in the history
  • Loading branch information
EHfive committed May 20, 2019
1 parent f44d32e commit 2fde9b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ option(CODEC_APTX_FF "aptX Classic support using FFmpeg" ON)
option(CODEC_APTX_HD_FF "aptX HD support using FFmpeg" ON)
option(CODEC_LDAC "LDAC encoding, abr support using libldac" ON)
option(FORCE_LARGEST_PA_VERSION "Build for largest available version( <= PulseAudio git master) of PulseAudio" OFF)

option(OFONO_HEADSET "ofono HFP headset support" ON)
option(NATIVE_HEADSET "native HSP headset support" ON)

add_definitions(-DHAVE_CONFIG_H)
add_definitions(-D_REENTRANT)
Expand All @@ -51,15 +52,24 @@ set(PulseAudio_CORE_LIBDIR ${PulseAudio_LIBDIR}/pulseaudio)
set(MOD_BT_DIR ${PROJECT_SOURCE_DIR}/src/modules/bluetooth)

set(bluez5_util_SOURCES
${MOD_BT_DIR}/backend-native.c
${MOD_BT_DIR}/backend-ofono.c
${MOD_BT_DIR}/bluez5-util.c
${MOD_BT_DIR}/a2dp/a2dp_sbc.c
${MOD_BT_DIR}/a2dp/a2dp_util.c
)
set(bluez5_util_RPATH "")
set(bluez5_util_LIBS "")

if(${OFONO_HEADSET} STREQUAL "ON")
set(HAVE_BLUEZ_5_OFONO_HEADSET 1)
set(bluez5_util_SOURCES ${bluez5_util_SOURCES} ${MOD_BT_DIR}/backend-ofono.c)
message("[HFP] ofono HFP headset support enabled")
endif()
if(${NATIVE_HEADSET} STREQUAL "ON")
set(HAVE_BLUEZ_5_NATIVE_HEADSET 1)
set(bluez5_util_SOURCES ${bluez5_util_SOURCES} ${MOD_BT_DIR}/backend-native.c)
message("[HSP] native HSP headset support enabled")
endif()

if(${AVCODEC_FOUND} AND ${AVUTIL_FOUND})
if(${CODEC_APTX_FF} STREQUAL "ON")
set(PA_A2DP_CODEC_APTX_FF 1)
Expand Down
4 changes: 2 additions & 2 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#define PACKAGE
#define HAVE_ATOMIC_BUILTINS

#define HAVE_BLUEZ_5_OFONO_HEADSET
#define HAVE_BLUEZ_5_NATIVE_HEADSET
#cmakedefine HAVE_BLUEZ_5_OFONO_HEADSET
#cmakedefine HAVE_BLUEZ_5_NATIVE_HEADSET
#define PACKAGE_VERSION "@PulseAudio_VERSION@"

#cmakedefine PA_A2DP_CODEC_APTX_FF
Expand Down

0 comments on commit 2fde9b7

Please sign in to comment.