diff options
author | Chris Robinson <[email protected]> | 2013-03-14 01:29:20 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-03-14 01:29:20 -0700 |
commit | d237410d1d40d65664381d5dbbe3a66e3291d1fa (patch) | |
tree | bec7ad7bfb185722c374bb1b1edeeac3d324ed9f /CMakeLists.txt | |
parent | 2486f13dae69fda15dec9e4aa1c61e7b235d62ff (diff) |
Add a QSA backend for QNX
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d7c5c97..ed7eb96b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ OPTION(ALSOFT_BACKEND_ALSA "Check for ALSA backend" ON) OPTION(ALSOFT_BACKEND_OSS "Check for OSS backend" ON) OPTION(ALSOFT_BACKEND_SOLARIS "Check for Solaris backend" ON) OPTION(ALSOFT_BACKEND_SNDIO "Check for SndIO backend" ON) +OPTION(ALSOFT_BACKEND_QSA "Check for QSA backend" ON) OPTION(ALSOFT_BACKEND_MMDEVAPI "Check for MMDevApi" ON) OPTION(ALSOFT_BACKEND_DSOUND "Check for DirectSound backend" ON) OPTION(ALSOFT_BACKEND_WINMM "Check for Windows Multimedia backend" ON) @@ -50,6 +51,7 @@ OPTION(ALSOFT_REQUIRE_ALSA "Require ALSA backend" OFF) OPTION(ALSOFT_REQUIRE_OSS "Require OSS backend" OFF) OPTION(ALSOFT_REQUIRE_SOLARIS "Require Solaris backend" OFF) OPTION(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF) +OPTION(ALSOFT_REQUIRE_QSA "Require QSA backend" OFF) OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi" OFF) OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF) OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF) @@ -76,6 +78,12 @@ ELSE() SET(LIBNAME openal) ENDIF() +# QNX's gcc do not uses /usr/include and /usr/lib pathes by default +IF ("${CMAKE_C_PLATFORM_ID}" STREQUAL "QNX") + ADD_DEFINITIONS("-I/usr/include") + SET(EXTRA_LIBS ${EXTRA_LIBS} -L/usr/lib) +ENDIF() + IF(NOT LIBTYPE) SET(LIBTYPE SHARED) ENDIF() @@ -509,6 +517,7 @@ SET(HAVE_ALSA 0) SET(HAVE_OSS 0) SET(HAVE_SOLARIS 0) SET(HAVE_SNDIO 0) +SET(HAVE_QSA 0) SET(HAVE_DSOUND 0) SET(HAVE_MMDEVAPI 0) SET(HAVE_WINMM 0) @@ -582,6 +591,27 @@ IF(ALSOFT_REQUIRE_SNDIO AND NOT HAVE_SNDIO) MESSAGE(FATAL_ERROR "Failed to enabled required SndIO backend") ENDIF() +# Check QSA backend +IF (ALSOFT_BACKEND_QSA AND "${CMAKE_C_PLATFORM_ID}" STREQUAL "QNX") + CHECK_INCLUDE_FILE(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H) + IF(HAVE_SYS_ASOUNDLIB_H) + CHECK_SHARED_FUNCTION_EXISTS(snd_pcm_open "sys/asoundlib.h" asound "" HAVE_LIBASOUND) + IF(HAVE_LIBASOUND OR HAVE_DLFCN_H) + SET(HAVE_QSA 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/backends/qsa.c) + SET(EXTRA_LIBS asound ${EXTRA_LIBS}) + IF(HAVE_DLFCN_H) + SET(BACKENDS "${BACKENDS} QSA,") + ELSE() + SET(BACKENDS "${BACKENDS} QSA \(linked\),") + ENDIF() + ENDIF() + ENDIF() +ENDIF() +IF(ALSOFT_REQUIRE_QSA AND NOT HAVE_QSA) + MESSAGE(FATAL_ERROR "Failed to enabled required QSA backend") +ENDIF() + # Check for MMDevApi backend IF(HAVE_WINDOWS_H) IF(ALSOFT_BACKEND_MMDEVAPI) |