From: hobbes1069 Date: Tue, 3 Jun 2014 16:53:07 +0000 (+0000) Subject: Add basic speex library detection and linking to the codec2 library. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=7a28ab58be2bae01d490e3d13c23908f049c5264;p=freetel-svn-tracking.git Add basic speex library detection and linking to the codec2 library. git-svn-id: https://svn.code.sf.net/p/freetel/code@1630 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/CMakeLists.txt b/codec2-dev/CMakeLists.txt index e9ef2262..9186f81e 100644 --- a/codec2-dev/CMakeLists.txt +++ b/codec2-dev/CMakeLists.txt @@ -118,6 +118,22 @@ configure_file ("${PROJECT_SOURCE_DIR}/cmake/config.h.in" "${PROJECT_BINARY_DIR}/config.h" ) include_directories(${PROJECT_BINARY_DIR}) +# +# Find speex library +# +message(STATUS "Looking for Speex DSP library.") +find_path(SPEEXDSP_INCLUDE_DIR speex/speex.h) +find_library(SPEEXDSP_LIBRARY speexdsp) +message(STATUS " Speex DSP headers: ${SPEEXDSP_INCLUDE_DIR}") +message(STATUS " Speex DSP library: ${SPEEXDSP_LIBRARY}") +if(SPEEXDSP_INCLUDE_DIR AND SPEEXDSP_LIBRARY) + include_directories(${SPEEXDSP_INCLUDE_DIR}) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${SPEEXDSP_LIBRARY}) +else(SPEEXDSP_INCLUDE_DIR AND SPEEXDSP_LIBRARY) + message(FATAL_ERROR "Speex DSP library not found!") +endif(SPEEXDSP_INCLUDE_DIR AND SPEEXDSP_LIBRARY) + + # # codec2 library #