TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindSBC.cmake
blobe9b90d72d682ab2b40c461260cebf71c5ea71889
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
13   NAMES
14   sbc/sbc.h
15   HINTS
16     "${SBC_HINTS}/include"
19 find_library( SBC_LIBRARY
20   NAMES
21     sbc
22     libsbc-1
23   HINTS
24     "${SBC_HINTS}/lib"
27 include( FindPackageHandleStandardArgs )
28 find_package_handle_standard_args( SBC DEFAULT_MSG SBC_LIBRARY SBC_INCLUDE_DIR )
30 if( SBC_FOUND )
31   set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} )
32   set( SBC_LIBRARIES ${SBC_LIBRARY} )
33   if (WIN32)
34     set ( SBC_DLL_DIR "${SBC_HINTS}/bin"
35       CACHE PATH "Path to SBC DLL"
36     )
37     file( GLOB _sbc_dll RELATIVE "${SBC_DLL_DIR}"
38       "${SBC_DLL_DIR}/libsbc-*.dll"
39     )
40     set ( SBC_DLL ${_sbc_dll}
41       # We're storing filenames only. Should we use STRING instead?
42       CACHE FILEPATH "SBC DLL file name"
43     )
44     mark_as_advanced( SBC_DLL_DIR SBC_DLL )
45   endif()
46 else()
47   set( SBC_INCLUDE_DIRS )
48   set( SBC_LIBRARIES )
49 endif()
51 mark_as_advanced( SBC_LIBRARIES SBC_INCLUDE_DIRS )