Use linux-any instead of a hardcoded list of negated architectures
[fmit.git] / cmake / FindALSA.cmake.new
1 # - Try to find ALSA
2 # Once done, this will define
3 #
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
9 #
10 # See documentation on how to write CMake scripts at
11 # http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
12
13 include(LibFindMacros)
14
15 libfind_pkg_check_modules(ALSA_PKGCONF alsa)
16
17 find_path(ALSA_INCLUDE_DIR
18   NAMES alsa/version.h
19   PATHS ${ALSA_PKGCONF_INCLUDE_DIRS}
20 )
21
22 find_library(ALSA_LIBRARY
23   NAMES asound
24   PATHS ${ALSA_PKGCONF_LIBRARY_DIRS}
25 )
26
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}")
30
31 set(ALSA_PROCESS_INCLUDES ALSA_INCLUDE_DIR)
32 set(ALSA_PROCESS_LIBS ALSA_LIBRARY)
33 libfind_process(ALSA)
34