From: hobbes1069 Date: Mon, 13 Mar 2017 17:50:30 +0000 (+0000) Subject: Add libsamplerate as a cmake dependency for codec2. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=b9594c8ae9519067edee3c8c5990e6be917cd507;p=freetel-svn-tracking.git Add libsamplerate as a cmake dependency for codec2. git-svn-id: https://svn.code.sf.net/p/freetel/code@3058 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/CMakeLists.txt b/codec2-dev/CMakeLists.txt index 940beb34..ebf8fff1 100644 --- a/codec2-dev/CMakeLists.txt +++ b/codec2-dev/CMakeLists.txt @@ -172,6 +172,24 @@ if(UNITTEST) message(FATAL_ERROR "Speex DSP library not found!") endif() + # + # Samplerate Library + # + message(STATUS "Looking for samplerate...") + find_library(LIBSAMPLERATE samplerate) + find_path(LIBSAMPLERATE_INCLUDE_DIR samplerate.h) + message(STATUS " samplerate headers: ${LIBSAMPLERATE_INCLUDE_DIR}") + message(STATUS " samplerate library: ${LIBSAMPLERATE}") + if(LIBSAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR) + list(APPEND FREEDV_LINK_LIBS ${CMAKE_REQUIRED_LIBRARIES}) + include_directories(${LIBSAMPLERATE_INCLUDE_DIR}) + else(LIBSTAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR) + message(FATAL_ERROR "samplerate library not found. +On Linux systems try installing: + samplerate-devel (RPM based systems) + libsamplerate-dev (DEB based systems)") + endif(LIBSAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR) + add_subdirectory(unittest) endif(UNITTEST)