1#############################################################################
2##    Kwave                - cmake/KwaveALSASupport.cmake
3##                           -------------------
4##    begin                : Sat Jun 02 2007
5##    copyright            : (C) 2007 by Thomas Eschenbacher
6##    email                : Thomas.Eschenbacher@gmx.de
7#############################################################################
8#
9#############################################################################
10#                                                                           #
11# Redistribution and use in source and binary forms, with or without        #
12# modification, are permitted provided that the following conditions        #
13# are met:                                                                  #
14#                                                                           #
15# 1. Redistributions of source code must retain the above copyright         #
16#    notice, this list of conditions and the following disclaimer.          #
17# 2. Redistributions in binary form must reproduce the above copyright      #
18#    notice, this list of conditions and the following disclaimer in the    #
19#    documentation and/or other materials provided with the distribution.   #
20#                                                                           #
21# For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file.        #
22#                                                                           #
23#############################################################################
24
25OPTION(WITH_ALSA "enable playback/recording via ALSA [default=on]" ON)
26
27IF (WITH_ALSA)
28
29    INCLUDE(FindALSA)
30    FIND_PATH(HAVE_ASOUNDLIB_H alsa/asoundlib.h)
31
32    IF (HAVE_ASOUNDLIB_H)
33        SET(HAVE_ALSA_SUPPORT  ON CACHE BOOL "enable ALSA support")
34    ELSE (HAVE_ASOUNDLIB_H)
35        MESSAGE(FATAL_ERROR "Your system lacks ALSA support")
36    ENDIF (HAVE_ASOUNDLIB_H)
37
38ENDIF (WITH_ALSA)
39
40#############################################################################
41#############################################################################
42