diff options
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | cmake/FindJack.cmake | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5315383..2cec8a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ OPTION(WITH_ZRTP "Enable ZRTP encrypted calls" OFF) OPTION(WITH_SPEEX "Enable the Speex codec" OFF) OPTION(WITH_ILBC "Enable the iLBC codec" OFF) OPTION(WITH_ALSA "Enable ALSA support" ON) +OPTION(WITH_JACK "Enable JackAudio support" ON) OPTION(WITH_DIAMONDCARD "Enable Diamondcard integration" OFF) OPTION(WITH_QT5 "Enable Qt 5 GUI" ON) OPTION(WITH_G729 "Enable G.729A support" OFF) @@ -52,6 +53,17 @@ if (WITH_ALSA) endif (ALSA_FOUND) endif (WITH_ALSA) +if (WITH_JACK) + find_package(Jack) + + if (JACK_FOUND) + message(STATUS "jack OK") + set(HAVE_JACK TRUE) + else (JACK_FOUND) + message(FATAL_ERROR "jack not found!") + endif (JACK_FOUND) +endif (WITH_JACK) + if (WITH_ZRTP) find_package(Zrtpcpp) diff --git a/cmake/FindJack.cmake b/cmake/FindJack.cmake new file mode 100644 index 0000000..1391d98 --- /dev/null +++ b/cmake/FindJack.cmake @@ -0,0 +1,18 @@ +FIND_PATH(JACK_INCLUDE_DIR jack/jack.h) +FIND_LIBRARY(JACK_LIBRARY NAMES jack) + +IF(JACK_INCLUDE_DIR AND JACK_LIBRARY) + SET(JACK_FOUND TRUE) + SET(JACK_LIBRARIES ${JACK_LIBRARY}) +ENDIF(JACK_INCLUDE_DIR AND JACK_LIBRARY) + +IF(JACK_FOUND) + IF (NOT Jack_FIND_QUIETLY) + MESSAGE(STATUS "Found jack includes: ${JACK_INCLUDE_DIR}/jack/jack.h") + MESSAGE(STATUS "Found jack library: ${JACK_LIBRARIES}") + ENDIF (NOT Jack_FIND_QUIETLY) +ELSE(JACK_FOUND) + IF (Jack_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find jack development files") + ENDIF (Jack_FIND_REQUIRED) +ENDIF(JACK_FOUND) |