aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-02-16 11:12:35 +0100
committerEvan Huus <eapache@gmail.com>2014-02-17 21:44:17 +0000
commit5e27a39fc6ed65bca15461bb61c26bbb0a946f88 (patch)
treefe11397a7b2611406cf2b0b9da3c264f5fb0740c /cmake/modules
parent49abfc47cc4d015f2e2f368d8c92f9ab6ca4377e (diff)
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>
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindSBC.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/cmake/modules/FindSBC.cmake b/cmake/modules/FindSBC.cmake
new file mode 100644
index 0000000000..00ed88d66e
--- /dev/null
+++ b/cmake/modules/FindSBC.cmake
@@ -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 )