Added detection of the pulseaudio version number.
This commit is contained in:
parent
7d5963a1e6
commit
f9097d45c8
@ -10,5 +10,14 @@ find_library(PULSE_LIBRARY pulse PATHS ${PULSE_LIBRARY_DIRS})
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pulse DEFAULT_MSG PULSE_INCLUDE_DIR PULSE_LIBRARY)
|
||||
|
||||
mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY)
|
||||
if(PULSE_LIBRARY)
|
||||
execute_process(COMMAND "pactl" "--version" OUTPUT_VARIABLE PULSE_VERSION_OUTPUT)
|
||||
|
||||
STRING(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" PULSE_VERSION "${PULSE_VERSION_OUTPUT}")
|
||||
if(NOT PULSE_VERSION)
|
||||
message(FATAL_ERROR "PulseAudio is not installed")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY PULSE_VERSION)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user