🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

  1. # - Find PulseAudio includes and libraries
  2. #
  3. # PULSEAUDIO_FOUND - True if PULSEAUDIO_INCLUDE_DIR &
  4. # PULSEAUDIO_LIBRARY are found
  5. # PULSEAUDIO_LIBRARIES - Set when PULSEAUDIO_LIBRARY is found
  6. # PULSEAUDIO_INCLUDE_DIRS - Set when PULSEAUDIO_INCLUDE_DIR is found
  7. #
  8. # PULSEAUDIO_INCLUDE_DIR - where to find pulse/pulseaudio.h, etc.
  9. # PULSEAUDIO_LIBRARY - the pulse library
  10. # PULSEAUDIO_VERSION_STRING - the version of PulseAudio found
  11. #
  12. find_path(PULSEAUDIO_INCLUDE_DIR
  13. NAMES pulse/pulseaudio.h
  14. DOC "The PulseAudio include directory"
  15. )
  16. find_library(PULSEAUDIO_LIBRARY
  17. NAMES pulse
  18. DOC "The PulseAudio library"
  19. )
  20. if(PULSEAUDIO_INCLUDE_DIR AND EXISTS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h")
  21. file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulse_version_str
  22. REGEX "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)")
  23. string(REGEX REPLACE "^.*pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]*)\"\\).*$" "\\1"
  24. PULSEAUDIO_VERSION_STRING "${pulse_version_str}")
  25. unset(pulse_version_str)
  26. endif()
  27. include(FindPackageHandleStandardArgs)
  28. find_package_handle_standard_args(PulseAudio
  29. REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR
  30. VERSION_VAR PULSEAUDIO_VERSION_STRING
  31. )
  32. if(PULSEAUDIO_FOUND)
  33. set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY})
  34. set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR})
  35. endif()
  36. mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)