2 # Once done, this will define
4 # ALSA_FOUND - system has ALSA (GL and GLU)
5 # ALSA_INCLUDE_DIRS - the ALSA include directories
6 # ALSA_LIBRARIES - link these to use ALSA
7 # ALSA_GL_LIBRARY - only GL
8 # ALSA_GLU_LIBRARY - only GLU
10 # See documentation on how to write CMake scripts at
11 # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
13 include(LibFindMacros)
15 libfind_pkg_check_modules(ALSA_PKGCONF alsa)
17 find_path(ALSA_INCLUDE_DIR
19 PATHS ${ALSA_PKGCONF_INCLUDE_DIRS}
22 find_library(ALSA_LIBRARY
24 PATHS ${ALSA_PKGCONF_LIBRARY_DIRS}
27 # Extract the version number
28 file(READ "${ALSA_INCLUDE_DIR}/alsa/version.h" _ALSA_VERSION_H_CONTENTS)
29 string(REGEX REPLACE ".*#define SND_LIB_VERSION_STR[ \t]*\"([^\n]*)\".*" "\\1" ALSA_VERSION "${_ALSA_VERSION_H_CONTENTS}")
31 set(ALSA_PROCESS_INCLUDES ALSA_INCLUDE_DIR)
32 set(ALSA_PROCESS_LIBS ALSA_LIBRARY)