1 # Find the native Bluetooth SBC Codec includes and library
3 # SBC_INCLUDE_DIRS - where to find sbc.h
4 # SBC_LIBRARIES - List of libraries when using SBC
5 # SBC_FOUND - True if SBC found
6 # SBC_DLL_DIR - (Windows) Path to the SBC DLL
7 # SBC_DLL - (Windows) Name of the SBC DLL
9 include( FindWSWinLibs )
10 FindWSWinLibs( "sbc-.*" "SBC_HINTS" )
12 find_path( SBC_INCLUDE_DIR
16 "${SBC_HINTS}/include"
19 find_library( SBC_LIBRARY
27 include( FindPackageHandleStandardArgs )
28 find_package_handle_standard_args( SBC DEFAULT_MSG SBC_LIBRARY SBC_INCLUDE_DIR )
31 set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} )
32 set( SBC_LIBRARIES ${SBC_LIBRARY} )
34 set ( SBC_DLL_DIR "${SBC_HINTS}/bin"
35 CACHE PATH "Path to SBC DLL"
37 file( GLOB _sbc_dll RELATIVE "${SBC_DLL_DIR}"
38 "${SBC_DLL_DIR}/libsbc-*.dll"
40 set ( SBC_DLL ${_sbc_dll}
41 # We're storing filenames only. Should we use STRING instead?
42 CACHE FILEPATH "SBC DLL file name"
44 mark_as_advanced( SBC_DLL_DIR SBC_DLL )
47 set( SBC_INCLUDE_DIRS )
51 mark_as_advanced( SBC_LIBRARIES SBC_INCLUDE_DIRS )