1 # Find the system's SpeexDSP includes and library
3 # SPEEXDSP_INCLUDE_DIRS - where to find SpeexDSP headers
4 # SPEEXDSP_LIBRARIES - List of libraries when using SpeexDSP
5 # SPEEXDSP_FOUND - True if SpeexDSP found
6 # SPEEXDSP_DLL_DIR - (Windows) Path to the SpeexDSP DLL
7 # SPEEXDSP_DLL - (Windows) Name of the SpeexDSP DLL
10 FindWSWinLibs("speexdsp-.*" "SPEEXDSP_HINTS")
12 if(NOT USE_REPOSITORY)
13 find_package(PkgConfig)
14 pkg_search_module(PC_SPEEXDSP speexdsp)
18 find_path(SPEEXDSP_INCLUDE_DIR
20 speex/speex_resampler.h
22 ${PC_SPEEXDSP_INCLUDE_DIRS}
23 ${SPEEXDSP_HINTS}/include
26 find_library(SPEEXDSP_LIBRARY
30 ${PC_SPEEXDSP_LIBRARY_DIRS}
34 include(FindPackageHandleStandardArgs)
35 find_package_handle_standard_args(SpeexDSP DEFAULT_MSG SPEEXDSP_LIBRARY SPEEXDSP_INCLUDE_DIR)
38 set(SPEEXDSP_LIBRARIES ${SPEEXDSP_LIBRARY})
39 set(SPEEXDSP_INCLUDE_DIRS ${SPEEXDSP_INCLUDE_DIR})
41 set(SPEEXDSP_DLL_DIR "${SPEEXDSP_HINTS}/bin"
42 CACHE PATH "Path to SpeexDSP DLL"
44 file(GLOB _speexdsp_dll RELATIVE "${SPEEXDSP_DLL_DIR}"
45 "${SPEEXDSP_DLL_DIR}/libspeexdsp.dll"
47 set(SPEEXDSP_DLL ${_speexdsp_dll}
48 # We're storing filenames only. Should we use STRING instead?
49 CACHE FILEPATH "SpeexDSP DLL file name"
51 mark_as_advanced(SPEEXDSP_DLL_DIR SPEEXDSP_DLL)
54 set(SPEEXDSP_LIBRARIES)
55 set(SPEEXDSP_INCLUDE_DIRS)
58 mark_as_advanced(SPEEXDSP_LIBRARIES SPEEXDSP_INCLUDE_DIRS)