CMake ignores -DUSE_PULSEAUDIO=OFF
I'm trying to build Musescore without pulseaudio support. I have added -DUSE_PULSEAUDIO=OFF to the cmake command, but cmake manages to find some old compatibility libraries I have lying around and decides to use pulseaudio anyway. (And since I don't have the headers for these libraries, the compilation fails).
c012358e711c9445f81b55900e124e00c0eff2f1 patched to show USE_PULSEAUDIO value at beginning and end of CMakeLists.txt:
$ cmake .. -DUSE_PULSEAUDIO=OFF 2>&1 | grep -i pulse USE_PULSEAUDIO=OFF -- checking for module 'libpulse' -- package 'libpulse' not found -- Found pulseaudio: /usr/lib32/libpulse.so Pulseaudio found. USE_PULSEAUDIO=1
The offending code:
## ## pulseaudio ## if (APPLE OR MINGW) set (USE_PULSEAUDIO 0) else (APPLE OR MINGW) if (PULSEAUDIO_FOUND) set(USE_PULSEAUDIO 1) message("Pulseaudio found.") else (PULSEAUDIO_FOUND) set(USE_PULSEAUDIO 0) message("Pulseaudio not found.") endif (PULSEAUDIO_FOUND) endif (APPLE OR MINGW)
Is this variable not meant to be user-settable? Can you change it to be user-settable?
(Interestingly, FindPulseAudio reports pulseaudio as found even though the include dir is not found. But it is a separate issue.