From caedd6bcf437cfcbecb2be19bd58aae4b3ac03a1 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 17 Nov 2018 16:00:32 +0100 Subject: [PATCH] Allow build without alsa on linux --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acd25175a..a6f0c0aa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,16 +48,12 @@ find_package(Gettext REQUIRED) find_package(PkgConfig REQUIRED) find_package(Protobuf REQUIRED) find_package(FFTW3) +find_package(ALSA) if(LINUX) - find_package(ALSA REQUIRED) pkg_check_modules(DBUS REQUIRED dbus-1) else(LINUX) - find_package(ALSA) pkg_check_modules(DBUS dbus-1) endif(LINUX) -if(ALSA_FOUND) - set(HAVE_ALSA ON) -endif() if (NOT APPLE) find_package(X11) endif() @@ -329,6 +325,10 @@ optional_component(SPARKLE ON "Sparkle integration" DEPENDS "Sparkle" SPARKLE ) +optional_component(ALSA ON "ALSA integration" + DEPENDS "ALSA" ALSA_FOUND +) + optional_component(LIBPULSE ON "Pulse audio integration" DEPENDS "libpulse" LIBPULSE_FOUND )