Add basic speex library detection and linking to the codec2 library.
authorhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 3 Jun 2014 16:53:07 +0000 (16:53 +0000)
committerhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 3 Jun 2014 16:53:07 +0000 (16:53 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1630 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/CMakeLists.txt

index e9ef22623eabb4306d01cd02591bc3aaf2ac4b0a..9186f81ebba7ab1e3ba3e678b0eb7238821c24d9 100644 (file)
@@ -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
 #