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)
17 find_path( BCG729_INCLUDE_DIR
18 NAMES bcg729/decoder.h
20 "${BCG729_INCLUDE_DIR}"
21 "${BCG729_HINTS}/include"
22 PATHS /usr/local/include /usr/include
25 find_library( BCG729_LIBRARY
30 PATHS /usr/local/lib /usr/lib
33 include( FindPackageHandleStandardArgs )
34 find_package_handle_standard_args( BCG729 DEFAULT_MSG BCG729_LIBRARY BCG729_INCLUDE_DIR )
37 set( BCG729_INCLUDE_DIRS ${BCG729_INCLUDE_DIR} )
38 set( BCG729_LIBRARIES ${BCG729_LIBRARY} )
40 set ( BCG729_DLL_DIR "${BCG729_HINTS}/bin"
41 CACHE PATH "Path to bcg729 DLL"
43 file( GLOB _bcg729_dll RELATIVE "${BCG729_DLL_DIR}"
44 "${BCG729_DLL_DIR}/libbcg729.dll"
46 set ( BCG729_DLL ${_bcg729_dll}
47 # We're storing filenames only. Should we use STRING instead?
48 CACHE FILEPATH "bcg729 DLL file name"
50 mark_as_advanced( BCG729_DLL_DIR BCG729_DLL )
53 set( BCG729_INCLUDE_DIRS )
54 set( BCG729_LIBRARIES )
57 mark_as_advanced( BCG729_LIBRARIES BCG729_INCLUDE_DIRS )