1 ## $Id: FindALSA.cmake.own,v 1.1 2010/05/15 15:57:16 norwin Exp $
3 # Check for the presence of ALSA
5 # HAVE_ALSA = Set to true, if all components have been found.
6 # ALSA_INCLUDES = Include path for the header files
7 # ALSA_LIBRARIES = Link these
9 ## -----------------------------------------------------------------------------
10 ## Check for the header files
12 FIND_PATH (ALSA_INCLUDES alsa/asoundlib.h
13 PATHS /usr/local/include /usr/include
16 ## -----------------------------------------------------------------------------
17 ## Check for the library
19 FIND_LIBRARY (ALSA_LIBRARIES asound
20 PATHS /usr/local/lib /usr/lib /lib /sw/lib
23 ## -----------------------------------------------------------------------------
24 ## Actions taken when all components have been found
26 IF (ALSA_INCLUDES AND ALSA_LIBRARIES)
28 ELSE (ALSA_INCLUDES AND ALSA_LIBRARIES)
29 MESSAGE (STATUS "Unable to find ALSA library")
30 ENDIF (ALSA_INCLUDES AND ALSA_LIBRARIES)
33 MESSAGE (STATUS "Found ALSA library")
34 MESSAGE (STATUS "ALSA_INCLUDES = ${ALSA_INCLUDES}")
35 MESSAGE (STATUS "ALSA_LIBRARIES = ${ALSA_LIBRARIES}")
37 IF (ALSA_FIND_REQUIRED)
38 MESSAGE (FATAL_ERROR "Could not find ALSA!")
39 ENDIF (ALSA_FIND_REQUIRED)
42 ## ------------------------------------------------------------------------------
43 ## Mark as advanced ...