FindALSA.cmake 998 B

1234567891011121314151617181920212223242526272829303132
  1. # - Find alsa
  2. # Find the alsa libraries (asound)
  3. #
  4. # This module defines the following variables:
  5. # ALSA_FOUND - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found
  6. # ALSA_LIBRARIES - Set when ALSA_LIBRARY is found
  7. # ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found
  8. #
  9. # ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
  10. # ALSA_LIBRARY - the asound library
  11. #
  12. find_path(ALSA_INCLUDE_DIR NAMES asoundlib.h
  13. PATH_SUFFIXES alsa
  14. DOC "The ALSA (asound) include directory"
  15. )
  16. find_library(ALSA_LIBRARY NAMES asound
  17. DOC "The ALSA (asound) library"
  18. )
  19. # handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if
  20. # all listed variables are TRUE
  21. include(FindPackageHandleStandardArgs)
  22. FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA DEFAULT_MSG ALSA_LIBRARY ALSA_INCLUDE_DIR)
  23. if(ALSA_FOUND)
  24. set( ALSA_LIBRARIES ${ALSA_LIBRARY} )
  25. set( ALSA_INCLUDE_DIRS ${ALSA_INCLUDE_DIR} )
  26. endif()
  27. mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY)