From 9d6ecc8beb5bfa746b3ba068228fdf70cebb6d49 Mon Sep 17 00:00:00 2001 From: Jimi Huotari Date: Thu, 7 Oct 2021 11:03:49 +0300 Subject: [PATCH] cmake: Don't link with PulseAudio when disabled Don't search for, or link with the PulseAudio library when DISABLE_PULSEAUDIO is true, and set as REQUIRED when false. Closes https://github.com/obsproject/obs-studio/issues/4025 --- libobs/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt index a7f8d0411..d61138d18 100644 --- a/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt @@ -28,8 +28,8 @@ if(UNIX) else() set(USE_XINPUT "0") endif() - find_package(PulseAudio) - if (NOT "${PULSEAUDIO_LIBRARY}" STREQUAL "") + if (NOT DISABLE_PULSEAUDIO) + find_package(PulseAudio REQUIRED) message(STATUS "Found PulseAudio - Audio Monitor enabled") set(HAVE_PULSEAUDIO "1") else()