Add build option "BUILD_WITH_PULSE"

This commit is contained in:
badaix 2021-01-06 21:59:21 +01:00
parent 1e29394931
commit 02624644cf

View file

@ -59,7 +59,7 @@ option(BUILD_WITH_TREMOR "Build with vorbis using TREMOR" ON)
option(BUILD_WITH_OPUS "Build with OPUS support" ON)
option(BUILD_WITH_AVAHI "Build with AVAHI support" ON)
option(BUILD_WITH_EXPAT "Build with EXPAT support" ON)
option(BUILD_WITH_PULSE "Build with PulseAudio support" ON)
if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build")
@ -168,10 +168,12 @@ if(NOT WIN32 AND NOT ANDROID)
add_definitions(-DHAS_ALSA)
endif (ALSA_FOUND)
pkg_search_module(PULSE libpulse)
if (PULSE_FOUND)
add_definitions(-DHAS_PULSE)
endif (PULSE_FOUND)
if(BUILD_WITH_PULSE)
pkg_search_module(PULSE libpulse)
if (PULSE_FOUND)
add_definitions(-DHAS_PULSE)
endif (PULSE_FOUND)
endif(BUILD_WITH_PULSE)
if(BUILD_WITH_AVAHI)
pkg_search_module(AVAHI avahi-client)