TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindBCG729.cmake
blob37b56938ac4f60751957c794d9fad62ef959a723
1 # Find the system's bcg729 includes and library
3 #  BCG729_INCLUDE_DIRS - where to find bcg729/decoder.h
4 #  BCG729_LIBRARIES    - List of libraries when using bcg729
5 #  BCG729_FOUND        - True if bcg729 found
6 #  BCG729_DLL_DIR      - (Windows) Path to the bcg729 DLL
7 #  BCG729_DLL          - (Windows) Name of the bcg729 DLL
9 include( FindWSWinLibs )
10 FindWSWinLibs( "bcg729-.*" "BCG729_HINTS" )
12 if (NOT USE_REPOSITORY)
13   find_package(PkgConfig QUIET)
14   pkg_search_module(BCG729 QUIET bcg729)
15 endif()
17 find_path( BCG729_INCLUDE_DIR
18   NAMES bcg729/decoder.h
19   HINTS
20     "${BCG729_INCLUDE_DIR}"
21     "${BCG729_HINTS}/include"
22   PATHS /usr/local/include /usr/include
25 find_library( BCG729_LIBRARY
26   NAMES bcg729
27   HINTS
28     "${BCG729_LIBDIR}"
29     "${BCG729_HINTS}/lib"
30   PATHS /usr/local/lib /usr/lib
33 include( FindPackageHandleStandardArgs )
34 find_package_handle_standard_args( BCG729 DEFAULT_MSG BCG729_LIBRARY BCG729_INCLUDE_DIR )
36 if( BCG729_FOUND )
37   set( BCG729_INCLUDE_DIRS ${BCG729_INCLUDE_DIR} )
38   set( BCG729_LIBRARIES ${BCG729_LIBRARY} )
39   if (WIN32)
40     set ( BCG729_DLL_DIR "${BCG729_HINTS}/bin"
41       CACHE PATH "Path to bcg729 DLL"
42     )
43     file( GLOB _bcg729_dll RELATIVE "${BCG729_DLL_DIR}"
44       "${BCG729_DLL_DIR}/libbcg729.dll"
45     )
46     set ( BCG729_DLL ${_bcg729_dll}
47       # We're storing filenames only. Should we use STRING instead?
48       CACHE FILEPATH "bcg729 DLL file name"
49     )
50     mark_as_advanced( BCG729_DLL_DIR BCG729_DLL )
51   endif()
52 else()
53   set( BCG729_INCLUDE_DIRS )
54   set( BCG729_LIBRARIES )
55 endif()
57 mark_as_advanced( BCG729_LIBRARIES BCG729_INCLUDE_DIRS )