diff options
author | Chris Robinson <[email protected]> | 2021-08-02 21:03:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-08-02 21:03:18 -0700 |
commit | 4cc820bb5c4c3c93ec85fed5a5bf7978b6bd14b1 (patch) | |
tree | faba9ec1b8ebed96eba03b6c70f8c244394d4a96 /CMakeLists.txt | |
parent | 0a0849db997df2015223bfd43cb7490fc8cd601e (diff) |
Start a PipeWire backend
It's just a copy of the Null backend to start with
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 446222ff..5d56a729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,8 @@ include(CheckStructHasMember) include(CMakePackageConfigHelpers) include(GNUInstallDirs) +find_package(PkgConfig) + option(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON) @@ -836,6 +838,7 @@ endif() set(HAVE_ALSA 0) set(HAVE_OSS 0) +set(HAVE_PIPEWIRE 0) set(HAVE_SOLARIS 0) set(HAVE_SNDIO 0) set(HAVE_DSOUND 0) @@ -907,6 +910,24 @@ if(ALSOFT_REQUIRE_OSS AND NOT HAVE_OSS) message(FATAL_ERROR "Failed to enabled required OSS backend") endif() +# Check PipeWire backend +option(ALSOFT_REQUIRE_PIPEWIRE "Require PipeWire backend" OFF) +if(PkgConfig_FOUND) + pkg_check_modules(PIPEWIRE libpipewire-0.3) + if(PIPEWIRE_FOUND) + option(ALSOFT_BACKEND_PIPEWIRE "Enable PipeWire backend" ON) + if(ALSOFT_BACKEND_PIPEWIRE) + set(HAVE_PIPEWIRE 1) + set(BACKENDS "${BACKENDS} PipeWire,") + set(ALC_OBJS ${ALC_OBJS} alc/backends/pipewire.cpp alc/backends/pipewire.h) + set(INC_PATHS ${INC_PATHS} ${PIPEWIRE_INCLUDE_DIRS}) + endif() + endif() +endif() +if(ALSOFT_REQUIRE_PIPEWIRE AND NOT HAVE_PIPEWIRE) + message(FATAL_ERROR "Failed to enabled required PipeWire backend") +endif() + # Check Solaris backend option(ALSOFT_REQUIRE_SOLARIS "Require Solaris backend" OFF) find_package(AudioIO) |