aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-12-21 15:51:16 -0800
committerChris Robinson <[email protected]>2014-12-21 15:51:16 -0800
commit23197ddbc35db09301b22636ea83e770a7900458 (patch)
tree05658f2c46fbd72e0222bb0bc32c433d109f7b31 /CMakeLists.txt
parentf2d59671b2410b575224b8ebddb89b62d61bf3e2 (diff)
Add a skeleton backend for JACK
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4d4286c..80bcadb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -913,6 +913,25 @@ IF(ALSOFT_REQUIRE_PULSEAUDIO AND NOT HAVE_PULSEAUDIO)
MESSAGE(FATAL_ERROR "Failed to enabled required PulseAudio backend")
ENDIF()
+# Check JACK backend
+OPTION(ALSOFT_REQUIRE_JACK "Require JACK backend" OFF)
+FIND_PACKAGE(JACK)
+IF(JACK_FOUND)
+ OPTION(ALSOFT_BACKEND_JACK "Enable JACK backend" ON)
+ IF(ALSOFT_BACKEND_JACK)
+ SET(HAVE_JACK 1)
+ SET(BACKENDS "${BACKENDS} JACK${IS_LINKED},")
+ SET(ALC_OBJS ${ALC_OBJS} Alc/backends/jack.c)
+ ADD_BACKEND_LIBS(${PULSEAUDIO_LIBRARIES})
+ IF(CMAKE_VERSION VERSION_LESS "2.8.8")
+ INCLUDE_DIRECTORIES(${JACK_INCLUDE_DIRS})
+ ENDIF()
+ ENDIF()
+ENDIF()
+IF(ALSOFT_REQUIRE_JACK AND NOT HAVE_JACK)
+ MESSAGE(FATAL_ERROR "Failed to enabled required JACK backend")
+ENDIF()
+
# Check CoreAudio backend
OPTION(ALSOFT_REQUIRE_COREAUDIO "Require CoreAudio backend" OFF)
FIND_LIBRARY(COREAUDIO_FRAMEWORK
@@ -1059,6 +1078,9 @@ ENDIF()
IF(HAVE_PULSEAUDIO)
SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${PULSEAUDIO_INCLUDE_DIRS})
ENDIF()
+IF(HAVE_JACK)
+ SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${JACK_INCLUDE_DIRS})
+ENDIF()
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION}
SOVERSION ${LIB_MAJOR_VERSION})
IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")