Add disable options for optional plugins

This commit is contained in:
BtbN
2014-09-10 13:47:50 +02:00
parent f0568f772d
commit 9f8b74b720
4 changed files with 40 additions and 10 deletions

View File

@@ -1,7 +1,14 @@
project(linux-pulseaudio)
if(DISABLE_PULSEAUDIO)
message(STATUS "PulseAudio support disabled")
return()
endif()
find_package(PulseAudio)
if(NOT PulseAudio_FOUND)
if(NOT PULSEAUDIO_FOUND AND ENABLE_PULSEAUDIO)
message(FATAL_ERROR "PulseAudio not found but set as enabled")
elseif(NOT PULSEAUDIO_FOUND)
message(STATUS "PulseAudio not found, disabling PulseAudio plugin")
return()
endif()