thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 318 forks source link

Searches for Jack and PulseAudio even when they are disabled with RTAUDIO_API_JACK and RTAUDIO_API_PULSE #358

Closed yurivict closed 1 year ago

yurivict commented 2 years ago
-- Checking for module 'jack'
--   Found jack, version 1.9.21
-- Checking for module 'libpulse-simple'
--   Found libpulse-simple, version 14.2

Version: 5.2.0

garyscavone commented 2 years ago

I don't find this issue clear enough to address properly. The title doesn't really make sense. If there is no response within a few days, I'll close this.

yurivict commented 2 years ago

When RTAUDIO_API_JACK=OFF and RTAUDIO_API_PULSE=OFF Jack and Pulse should be disabled.

However, configure still searches for them for some reason.

garyscavone commented 2 years ago

If you type "configure --help", you'll see that the flags should be "--with-jack", "--with-alsa", etc... I don't know why you were trying to use something like RTAUDIO_API_JACK=OFF for configure options.

yurivict commented 2 years ago

It uses cmake to configure.

garyscavone commented 2 years ago

Generally, I don't deal with the build issues and I don't use cmake. If there is a problem with the cmake configuration, someone needs to submit a PR.

yurivict commented 2 years ago

This is a minor issue with cmake that I reported. It shouldn't be looking for dependency packages that aren't enabled. Otherwise cmake works fine.

OPNA2608 commented 2 years ago

Yes it checks for both libraries, regardless of what options you supply: https://github.com/thestk/rtaudio/blob/7887bcfd13e46739758d39ea362bd1e32980efa9/CMakeLists.txt#L12-L21

But these checks are only used for the default values of the options, and do not affect the resulting compilation if you explicitly override the options: https://github.com/thestk/rtaudio/blob/7887bcfd13e46739758d39ea362bd1e32980efa9/CMakeLists.txt#L56-L57

Their respective blocks use the option values, so the detection shouldn't override your selection: https://github.com/thestk/rtaudio/blob/7887bcfd13e46739758d39ea362bd1e32980efa9/CMakeLists.txt#L109-L121 https://github.com/thestk/rtaudio/blob/7887bcfd13e46739758d39ea362bd1e32980efa9/CMakeLists.txt#L149-L158

Requiring jack_FOUND and later having an if block around it looks like an error, but that won't affect you if you use -DRTAUDIO_API_JACK=OFF -DRTAUDIO_API_PULSE=OFF anyway.

tl;dr, I don't see a problem here.