diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-05-21 13:47:54 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-05-21 13:47:54 -0400 |
| commit | d9876849f0208291cc7010522e85593703ff52bd (patch) | |
| tree | 16ee02f0ce1e317a09fd4c2a3f9fbdc04aadfe60 | |
| parent | 4c5ab244331bef95f20f04d174ae70c6cffbc252 (diff) | |
add options for Cmake to which audio libraries to build
| -rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a8fd38..563d408 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,19 @@ include( FindPkgConfig ) include( CheckIncludeFile ) -pkg_check_modules( PULSE libpulse ) -pkg_check_modules( ALSA alsa ) -check_include_file( "sys/soundcard.h" HAVE_OSS_HEADER ) +option( TMIX_WITH_PULSE "Enable PulseAudio backend" ON ) +option( TMIX_WITH_ALSA "Enable ALSA backend" ON ) +option( TMIX_WITH_OSS "Enable OSS backend" ON ) + +if( TMIX_WITH_PULSE ) + pkg_check_modules( PULSE libpulse ) +endif() +if( TMIX_WITH_ALSA ) + pkg_check_modules( ALSA alsa ) +endif() +if( TMIX_WITH_OSS ) + check_include_file( "sys/soundcard.h" HAVE_OSS_HEADER ) +endif() if( NOT PULSE_FOUND AND NOT ALSA_FOUND AND NOT HAVE_OSS_HEADER ) message( FATAL_ERROR "No audio backend found (need libpulse, libasound, or sys/soundcard.h)" ) |
