aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt155
-rw-r--r--cmake/FindAudioIO.cmake21
-rw-r--r--cmake/FindOSS.cmake21
-rw-r--r--cmake/FindPortAudio.cmake32
-rw-r--r--cmake/FindPulseAudio.cmake43
-rw-r--r--cmake/FindQSA.cmake34
-rw-r--r--cmake/FindSoundIO.cmake32
7 files changed, 259 insertions, 79 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e84cd64..305dcf68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,37 +37,16 @@ ELSE()
ENDIF()
-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 backend" ON)
OPTION(ALSOFT_BACKEND_DSOUND "Check for DirectSound backend" ON)
OPTION(ALSOFT_BACKEND_WINMM "Check for Windows Multimedia backend" ON)
-OPTION(ALSOFT_BACKEND_PORTAUDIO "Check for PortAudio backend" ON)
-OPTION(ALSOFT_BACKEND_PULSEAUDIO "Check for PulseAudio backend" ON)
-OPTION(ALSOFT_BACKEND_COREAUDIO "Check for CoreAudio backend" ON)
OPTION(ALSOFT_BACKEND_OPENSL "Check for OpenSL backend" ON)
-OPTION(ALSOFT_BACKEND_WAVE "Enable Wave Writer backend" ON)
-
-OPTION(ALSOFT_REQUIRE_SSE "Require SSE/SSE2 support" OFF)
-OPTION(ALSOFT_REQUIRE_NEON "Require ARM Neon support" 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)
-OPTION(ALSOFT_REQUIRE_PORTAUDIO "Require PortAudio backend" OFF)
-OPTION(ALSOFT_REQUIRE_PULSEAUDIO "Require PulseAudio backend" OFF)
-OPTION(ALSOFT_REQUIRE_COREAUDIO "Require CoreAudio backend" OFF)
OPTION(ALSOFT_REQUIRE_OPENSL "Require OpenSL backend" OFF)
-OPTION(ALSOFT_REQUIRE_FLUIDSYNTH "Require FluidSynth MIDI" OFF)
-
OPTION(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON)
OPTION(ALSOFT_WERROR "Treat compile warnings as errors" OFF)
@@ -569,6 +548,7 @@ SET(HAVE_SSE 0)
SET(HAVE_NEON 0)
# Check for SSE support
+OPTION(ALSOFT_REQUIRE_SSE "Require SSE/SSE2 support" OFF)
CHECK_INCLUDE_FILE(xmmintrin.h HAVE_XMMINTRIN_H "${SSE_SWITCH}")
IF(HAVE_XMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE "Enable SSE/SSE2 support" ON)
@@ -587,6 +567,7 @@ IF(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE)
ENDIF()
# Check for ARM Neon support
+OPTION(ALSOFT_REQUIRE_NEON "Require ARM Neon support" OFF)
CHECK_INCLUDE_FILE(arm_neon.h HAVE_ARM_NEON_H)
IF(HAVE_ARM_NEON_H)
OPTION(ALSOFT_CPUEXT_NEON "Enable ARM Neon support" ON)
@@ -612,6 +593,7 @@ SET(ALC_OBJS ${ALC_OBJS}
SET(HAVE_FLUIDSYNTH 0)
# Check for FluidSynth support
+OPTION(ALSOFT_REQUIRE_FLUIDSYNTH "Require FluidSynth MIDI" OFF)
FIND_PACKAGE(FluidSynth)
IF(FLUIDSYNTH_FOUND)
OPTION(ALSOFT_MIDI_FLUIDSYNTH "Enable FluidSynth MIDI" ON)
@@ -673,10 +655,14 @@ IF(ALSOFT_REQUIRE_ALSA AND NOT HAVE_ALSA)
ENDIF()
# Check OSS backend
-IF(ALSOFT_BACKEND_OSS)
- CHECK_INCLUDE_FILE(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
- IF(HAVE_SYS_SOUNDCARD_H)
+OPTION(ALSOFT_REQUIRE_OSS "Require OSS backend" OFF)
+FIND_PACKAGE(OSS)
+IF(OSS_FOUND)
+ OPTION(ALSOFT_BACKEND_OSS "Enable OSS backend" ON)
+ IF(ALSOFT_BACKEND_OSS)
SET(HAVE_OSS 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/oss.c PROPERTIES
+ INCLUDE_DIRECTORIES "${OSS_INCLUDE_DIRS}")
SET(ALC_OBJS ${ALC_OBJS} Alc/backends/oss.c)
SET(BACKENDS "${BACKENDS} OSS,")
ENDIF()
@@ -686,10 +672,14 @@ IF(ALSOFT_REQUIRE_OSS AND NOT HAVE_OSS)
ENDIF()
# Check Solaris backend
-IF(ALSOFT_BACKEND_SOLARIS)
- CHECK_INCLUDE_FILE(sys/audioio.h HAVE_SYS_AUDIOIO_H)
- IF(HAVE_SYS_AUDIOIO_H)
+OPTION(ALSOFT_REQUIRE_SOLARIS "Require Solaris backend" OFF)
+FIND_PACKAGE(AudioIO)
+IF(AUDIOIO_FOUND)
+ OPTION(ALSOFT_BACKEND_SOLARIS "Enable Solaris backend" ON)
+ IF(ALSOFT_BACKEND_SOLARIS)
SET(HAVE_SOLARIS 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/solaris.c PROPERTIES
+ INCLUDE_DIRECTORIES "${AUDIOIO_INCLUDE_DIRS}")
SET(ALC_OBJS ${ALC_OBJS} Alc/backends/solaris.c)
SET(BACKENDS "${BACKENDS} Solaris,")
ENDIF()
@@ -699,16 +689,17 @@ IF(ALSOFT_REQUIRE_SOLARIS AND NOT HAVE_SOLARIS)
ENDIF()
# Check SndIO backend
-IF(ALSOFT_BACKEND_SNDIO)
- CHECK_INCLUDE_FILE(sndio.h HAVE_SNDIO_H)
- IF(HAVE_SNDIO_H)
- CHECK_SHARED_FUNCTION_EXISTS(sio_open "sndio.h" sndio "" HAVE_LIBSNDIO)
- IF(HAVE_LIBSNDIO)
- SET(HAVE_SNDIO 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/sndio.c)
- SET(BACKENDS "${BACKENDS} SndIO \(linked\),")
- SET(EXTRA_LIBS sndio ${EXTRA_LIBS})
- ENDIF()
+OPTION(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
+FIND_PACKAGE(SoundIO)
+IF(SOUNDIO_FOUND)
+ OPTION(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON)
+ IF(ALSOFT_BACKEND_SNDIO)
+ SET(HAVE_SNDIO 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/sndio.c PROPERTIES
+ INCLUDE_DIRECTORIES "${SOUNDIO_INCLUDE_DIRS}")
+ SET(ALC_OBJS ${ALC_OBJS} Alc/backends/sndio.c)
+ SET(BACKENDS "${BACKENDS} SndIO \(linked\),")
+ SET(EXTRA_LIBS ${SOUNDIO_LIBRARIES} ${EXTRA_LIBS})
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SNDIO AND NOT HAVE_SNDIO)
@@ -716,16 +707,17 @@ IF(ALSOFT_REQUIRE_SNDIO AND NOT HAVE_SNDIO)
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)
- SET(HAVE_QSA 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/qsa.c)
- SET(EXTRA_LIBS asound ${EXTRA_LIBS})
- SET(BACKENDS "${BACKENDS} QSA \(linked\),")
- ENDIF()
+OPTION(ALSOFT_REQUIRE_QSA "Require QSA backend" OFF)
+FIND_PACKAGE(QSA)
+IF(QSA_FOUND)
+ OPTION(ALSOFT_BACKEND_QSA "Enable QSA backend" ON)
+ IF(ALSOFT_BACKEND_QSA)
+ SET(HAVE_QSA 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/qsa.c PROPERTIES
+ INCLUDE_DIRECTORIES "${QSA_INCLUDE_DIRS}")
+ SET(ALC_OBJS ${ALC_OBJS} Alc/backends/qsa.c)
+ SET(EXTRA_LIBS ${QSA_LIBRARIES} ${EXTRA_LIBS})
+ SET(BACKENDS "${BACKENDS} QSA \(linked\),")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_QSA AND NOT HAVE_QSA)
@@ -785,19 +777,20 @@ IF(ALSOFT_REQUIRE_WINMM AND NOT HAVE_WINMM)
ENDIF()
# Check PortAudio backend
-IF(ALSOFT_BACKEND_PORTAUDIO)
- CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
- IF(HAVE_PORTAUDIO_H)
- CHECK_SHARED_FUNCTION_EXISTS(Pa_Initialize "portaudio.h" portaudio "" HAVE_LIBPORTAUDIO)
- IF(HAVE_LIBPORTAUDIO OR HAVE_DLFCN_H OR WIN32)
- SET(HAVE_PORTAUDIO 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/portaudio.c)
- IF(HAVE_DLFCN_H OR WIN32)
- SET(BACKENDS "${BACKENDS} PortAudio,")
- ELSE()
- SET(BACKENDS "${BACKENDS} PortAudio \(linked\),")
- SET(EXTRA_LIBS portaudio ${EXTRA_LIBS})
- ENDIF()
+OPTION(ALSOFT_REQUIRE_PORTAUDIO "Require PortAudio backend" OFF)
+FIND_PACKAGE(PortAudio)
+IF(PORTAUDIO_FOUND)
+ OPTION(ALSOFT_BACKEND_PORTAUDIO "Enable PortAudio backend" ON)
+ IF(ALSOFT_BACKEND_PORTAUDIO)
+ SET(HAVE_PORTAUDIO 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/portaudio.c PROPERTIES
+ INCLUDE_DIRECTORIES "${PORTAUDIO_INCLUDE_DIRS}")
+ SET(ALC_OBJS ${ALC_OBJS} Alc/backends/portaudio.c)
+ IF(HAVE_DLFCN_H OR WIN32)
+ SET(BACKENDS "${BACKENDS} PortAudio,")
+ ELSE()
+ SET(BACKENDS "${BACKENDS} PortAudio \(linked\),")
+ SET(EXTRA_LIBS ${PORTAUDIO_LIBRARIES} ${EXTRA_LIBS})
ENDIF()
ENDIF()
ENDIF()
@@ -806,19 +799,20 @@ IF(ALSOFT_REQUIRE_PORTAUDIO AND NOT HAVE_PORTAUDIO)
ENDIF()
# Check PulseAudio backend
-IF(ALSOFT_BACKEND_PULSEAUDIO)
- CHECK_INCLUDE_FILE(pulse/pulseaudio.h HAVE_PULSE_PULSEAUDIO_H)
- IF(HAVE_PULSE_PULSEAUDIO_H)
- CHECK_SHARED_FUNCTION_EXISTS(pa_context_new "pulse/pulseaudio.h" pulse "" HAVE_LIBPULSE)
- IF(HAVE_LIBPULSE OR HAVE_DLFCN_H OR WIN32)
- SET(HAVE_PULSEAUDIO 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/pulseaudio.c)
- IF(HAVE_DLFCN_H OR WIN32)
- SET(BACKENDS "${BACKENDS} PulseAudio,")
- ELSE()
- SET(BACKENDS "${BACKENDS} PulseAudio \(linked\),")
- SET(EXTRA_LIBS pulse ${EXTRA_LIBS})
- ENDIF()
+OPTION(ALSOFT_REQUIRE_PULSEAUDIO "Require PulseAudio backend" OFF)
+FIND_PACKAGE(PulseAudio)
+IF(PULSEAUDIO_FOUND)
+ OPTION(ALSOFT_BACKEND_PULSEAUDIO "Enable PulseAudio backend" ON)
+ IF(ALSOFT_BACKEND_PULSEAUDIO)
+ SET(HAVE_PULSEAUDIO 1)
+ SET_SOURCE_FILES_PROPERTIES(Alc/backends/pulseaudio.c PROPERTIES
+ INCLUDE_DIRECTORIES "${PULSEAUDIO_INCLUDE_DIRS}")
+ SET(ALC_OBJS ${ALC_OBJS} Alc/backends/pulseaudio.c)
+ IF(HAVE_DLFCN_H OR WIN32)
+ SET(BACKENDS "${BACKENDS} PulseAudio,")
+ ELSE()
+ SET(BACKENDS "${BACKENDS} PulseAudio \(linked\),")
+ SET(EXTRA_LIBS ${PULSEAUDIO_LIBRARIES} ${EXTRA_LIBS})
ENDIF()
ENDIF()
ENDIF()
@@ -827,12 +821,14 @@ IF(ALSOFT_REQUIRE_PULSEAUDIO AND NOT HAVE_PULSEAUDIO)
ENDIF()
# Check CoreAudio backend
-IF(ALSOFT_BACKEND_COREAUDIO)
- FIND_LIBRARY(COREAUDIO_FRAMEWORK
- NAMES CoreAudio
- PATHS /System/Library/Frameworks
- )
- IF(COREAUDIO_FRAMEWORK)
+OPTION(ALSOFT_REQUIRE_COREAUDIO "Require CoreAudio backend" OFF)
+FIND_LIBRARY(COREAUDIO_FRAMEWORK
+ NAMES CoreAudio
+ PATHS /System/Library/Frameworks
+)
+IF(COREAUDIO_FRAMEWORK)
+ OPTION(ALSOFT_BACKEND_COREAUDIO "Check for CoreAudio backend" ON)
+ IF(ALSOFT_BACKEND_COREAUDIO)
SET(HAVE_COREAUDIO 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/backends/coreaudio.c)
SET(BACKENDS "${BACKENDS} CoreAudio,")
@@ -875,6 +871,7 @@ IF(ALSOFT_REQUIRE_OPENSL AND NOT HAVE_OPENSL)
ENDIF()
# Optionally enable the Wave Writer backend
+OPTION(ALSOFT_BACKEND_WAVE "Enable Wave Writer backend" ON)
IF(ALSOFT_BACKEND_WAVE)
SET(HAVE_WAVE 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/backends/wave.c)
diff --git a/cmake/FindAudioIO.cmake b/cmake/FindAudioIO.cmake
new file mode 100644
index 00000000..f0f8b2a5
--- /dev/null
+++ b/cmake/FindAudioIO.cmake
@@ -0,0 +1,21 @@
+# - Find AudioIO includes and libraries
+#
+# AUDIOIO_FOUND - True if AUDIOIO_INCLUDE_DIR is found
+# AUDIOIO_INCLUDE_DIRS - Set when AUDIOIO_INCLUDE_DIR is found
+#
+# AUDIOIO_INCLUDE_DIR - where to find sys/audioio.h, etc.
+#
+
+find_path(AUDIOIO_INCLUDE_DIR
+ NAMES sys/audioio.h
+ DOC "The AudioIO include directory"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(AudioIO REQUIRED_VARS AUDIOIO_INCLUDE_DIR)
+
+if(AUDIOIO_FOUND)
+ set(AUDIOIO_INCLUDE_DIRS ${AUDIOIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(AUDIOIO_INCLUDE_DIR)
diff --git a/cmake/FindOSS.cmake b/cmake/FindOSS.cmake
new file mode 100644
index 00000000..88ee66ad
--- /dev/null
+++ b/cmake/FindOSS.cmake
@@ -0,0 +1,21 @@
+# - Find OSS includes
+#
+# OSS_FOUND - True if OSS_INCLUDE_DIR is found
+# OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
+#
+# OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
+#
+
+find_path(OSS_INCLUDE_DIR
+ NAMES sys/soundcard.h
+ DOC "The OSS include directory"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OSS REQUIRED_VARS OSS_INCLUDE_DIR)
+
+if(OSS_FOUND)
+ set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(OSS_INCLUDE_DIR)
diff --git a/cmake/FindPortAudio.cmake b/cmake/FindPortAudio.cmake
new file mode 100644
index 00000000..fad2313d
--- /dev/null
+++ b/cmake/FindPortAudio.cmake
@@ -0,0 +1,32 @@
+# - Find PortAudio includes and libraries
+#
+# PORTAUDIO_FOUND - True if PORTAUDIO_INCLUDE_DIR & PORTAUDIO_LIBRARY
+# are found
+# PORTAUDIO_LIBRARIES - Set when PORTAUDIO_LIBRARY is found
+# PORTAUDIO_INCLUDE_DIRS - Set when PORTAUDIO_INCLUDE_DIR is found
+#
+# PORTAUDIO_INCLUDE_DIR - where to find portaudio.h, etc.
+# PORTAUDIO_LIBRARY - the portaudio library
+#
+
+find_path(PORTAUDIO_INCLUDE_DIR
+ NAMES portaudio.h
+ DOC "The PortAudio include directory"
+)
+
+find_library(PORTAUDIO_LIBRARY
+ NAMES portaudio
+ DOC "The PortAudio library"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PortAudio
+ REQUIRED_VARS PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR
+)
+
+if(PORTAUDIO_FOUND)
+ set(PORTAUDIO_LIBRARIES ${PORTAUDIO_LIBRARY})
+ set(PORTAUDIO_INCLUDE_DIRS ${PORTAUDIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(PORTAUDIO_INCLUDE_DIR PORTAUDIO_LIBRARY)
diff --git a/cmake/FindPulseAudio.cmake b/cmake/FindPulseAudio.cmake
new file mode 100644
index 00000000..1f6f843a
--- /dev/null
+++ b/cmake/FindPulseAudio.cmake
@@ -0,0 +1,43 @@
+# - Find PulseAudio includes and libraries
+#
+# PULSEAUDIO_FOUND - True if PULSEAUDIO_INCLUDE_DIR &
+# PULSEAUDIO_LIBRARY are found
+# PULSEAUDIO_LIBRARIES - Set when PULSEAUDIO_LIBRARY is found
+# PULSEAUDIO_INCLUDE_DIRS - Set when PULSEAUDIO_INCLUDE_DIR is found
+#
+# PULSEAUDIO_INCLUDE_DIR - where to find pulse/pulseaudio.h, etc.
+# PULSEAUDIO_LIBRARY - the pulse library
+# PULSEAUDIO_VERSION_STRING - the version of PulseAudio found
+#
+
+find_path(PULSEAUDIO_INCLUDE_DIR
+ NAMES pulse/pulseaudio.h
+ DOC "The PulseAudio include directory"
+)
+
+find_library(PULSEAUDIO_LIBRARY
+ NAMES pulse
+ DOC "The PulseAudio library"
+)
+
+if(PULSEAUDIO_INCLUDE_DIR AND EXISTS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h")
+ file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulse_version_str
+ REGEX "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)")
+
+ string(REGEX REPLACE "^.*pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]*)\"\\).*$" "\\1"
+ PULSEAUDIO_VERSION_STRING "${pulse_version_str}")
+ unset(pulse_version_str)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PulseAudio
+ REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR
+ VERSION_VAR PULSEAUDIO_VERSION_STRING
+)
+
+if(PULSEAUDIO_FOUND)
+ set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY})
+ set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
diff --git a/cmake/FindQSA.cmake b/cmake/FindQSA.cmake
new file mode 100644
index 00000000..0ad1fd43
--- /dev/null
+++ b/cmake/FindQSA.cmake
@@ -0,0 +1,34 @@
+# - Find QSA includes and libraries
+#
+# QSA_FOUND - True if QSA_INCLUDE_DIR & QSA_LIBRARY are found
+# QSA_LIBRARIES - Set when QSA_LIBRARY is found
+# QSA_INCLUDE_DIRS - Set when QSA_INCLUDE_DIR is found
+#
+# QSA_INCLUDE_DIR - where to find sys/asoundlib.h, etc.
+# QSA_LIBRARY - the asound library
+#
+
+# Only check for QSA on QNX, because it conflicts with ALSA.
+if("${CMAKE_C_PLATFORM_ID}" STREQUAL "QNX")
+ find_path(QSA_INCLUDE_DIR
+ NAMES sys/asoundlib.h
+ DOC "The QSA include directory"
+ )
+
+ find_library(QSA_LIBRARY
+ NAMES asound
+ DOC "The QSA library"
+ )
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(QSA
+ REQUIRED_VARS QSA_LIBRARY QSA_INCLUDE_DIR
+)
+
+if(QSA_FOUND)
+ set(QSA_LIBRARIES ${QSA_LIBRARY})
+ set(QSA_INCLUDE_DIRS ${QSA_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(QSA_INCLUDE_DIR QSA_LIBRARY)
diff --git a/cmake/FindSoundIO.cmake b/cmake/FindSoundIO.cmake
new file mode 100644
index 00000000..10450254
--- /dev/null
+++ b/cmake/FindSoundIO.cmake
@@ -0,0 +1,32 @@
+# - Find SoundIO (sndio) includes and libraries
+#
+# SOUNDIO_FOUND - True if SOUNDIO_INCLUDE_DIR & SOUNDIO_LIBRARY are
+# found
+# SOUNDIO_LIBRARIES - Set when SOUNDIO_LIBRARY is found
+# SOUNDIO_INCLUDE_DIRS - Set when SOUNDIO_INCLUDE_DIR is found
+#
+# SOUNDIO_INCLUDE_DIR - where to find sndio.h, etc.
+# SOUNDIO_LIBRARY - the sndio library
+#
+
+find_path(SOUNDIO_INCLUDE_DIR
+ NAMES sndio.h
+ DOC "The SoundIO include directory"
+)
+
+find_library(SOUNDIO_LIBRARY
+ NAMES sndio
+ DOC "The SoundIO library"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SoundIO
+ REQUIRED_VARS SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR
+)
+
+if(SOUNDIO_FOUND)
+ set(SOUNDIO_LIBRARIES ${SOUNDIO_LIBRARY})
+ set(SOUNDIO_INCLUDE_DIRS ${SOUNDIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)