Browse Source

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
Jimi Huotari 4 years ago
parent
commit
9d6ecc8beb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libobs/CMakeLists.txt

+ 2 - 2
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()