Add Bluetooth SBC Codec support in cmake

SBC Codec can be optionally linked with Wireshark to provide
ability to playing RTP/SBC stream by RTP Player.

Change-Id: Iffbae16a741ffbfd0fb55a300064739d2c27c2e5
Reviewed-on: https://code.wireshark.org/review/223
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Michal Labedzki 2014-02-16 11:12:35 +01:00 committed by Evan Huus
parent 49abfc47cc
commit 5e27a39fc6
4 changed files with 46 additions and 0 deletions

View File

@ -499,6 +499,10 @@ if(ENABLE_NETLINK)
set(PACKAGELIST ${PACKAGELIST} NL)
endif()
if(ENABLE_SBC)
set(PACKAGELIST ${PACKAGELIST} SBC)
endif()
# Capabilities
if(ENABLE_CAP)
set(PACKAGELIST ${PACKAGELIST} CAP SETCAP)
@ -590,6 +594,9 @@ endif()
if(HAVE_LIBNL AND HAVE_AIRPCAP)
message(ERROR "Airpcap and Libnl support are mutually exclusive")
endif()
if(HAVE_LIBSBC)
set(HAVE_SBC 1)
endif()
# No matter which version of GTK is present
if(GTK2_FOUND OR GTK3_FOUND)
set(GTK_FOUND ON)

View File

@ -56,6 +56,7 @@ option(ENABLE_CARES "Build with c-ares support" ON)
option(ENABLE_NETLINK "Build with libnl support" ON)
# todo Mostly hardcoded
option(ENABLE_KERBEROS "Build with Kerberos support" ON)
option(ENABLE_SBC "Build with SBC Codec support in RTP Player" ON)
# How to install
set(DUMPCAP_INSTALL_OPTION "normal" CACHE STRING "Permissions to install")
set(DUMPCAP_INST_VALS "normal" "suid" "capabilities")

View File

@ -0,0 +1,35 @@
# Find the native Bluetooth SBC Codec includes and library
#
# SBC_INCLUDE_DIRS - where to find sbc.h
# SBC_LIBRARIES - List of libraries when using SBC
# SBC_FOUND - True if SBC found
include( FindWSWinLibs )
FindWSWinLibs( "sbc" "SBC_HINTS" )
find_path( SBC_INCLUDE_DIR
NAMES
sbc/sbc.h
HINTS
"${SBC_HINTS}/include"
)
find_library( SBC_LIBRARY
NAMES
sbc
HINTS
"${SBC_HINTS}/lib"
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( SBC DEFAULT_MSG SBC_INCLUDE_DIR SBC_LIBRARY )
if( SBC_FOUND )
set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} )
set( SBC_LIBRARIES ${SBC_LIBRARY} )
else()
set( SBC_INCLUDE_DIRS )
set( SBC_LIBRARIES )
endif()
mark_as_advanced( SBC_LIBRARIES SBC_INCLUDE_DIRS )

View File

@ -243,6 +243,9 @@
/* Define if sa_len field exists in struct sockaddr */
#cmakedefine HAVE_SA_LEN 1
/* Define to 1 if you want to playing SBC by standalone BlueZ SBC library */
#cmakedefine HAVE_SBC 1
/* Define to 1 if you have the `setresgid' function. */
#cmakedefine HAVE_SETRESGID 1