diff --git a/CMakeLists.txt b/CMakeLists.txt index 656ef3e17c..58af5915c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ option(ENABLE_AO "Enables libao sound backend" ON) option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON) option(ENABLE_OPENAL "Enables OpenAL sound backend" ON) option(ENABLE_LLVM "Enables LLVM support, for disassembly" ON) +option(ENABLE_BLUEZ "Enables bluetooth support" ON) # Maintainers: if you consider blanket disabling this for your users, please # consider the following points: @@ -476,14 +477,18 @@ else() message("ao explicitly disabled, disabling ao sound backend") endif() -check_lib(BLUEZ bluez bluez QUIET) -if(BLUEZ_FOUND) - add_definitions(-DHAVE_BLUEZ=1) - message("bluez found, enabling bluetooth support") +if(ENABLE_BLUEZ) + check_lib(BLUEZ bluez bluez QUIET) + if(BLUEZ_FOUND) + add_definitions(-DHAVE_BLUEZ=1) + message("bluez found, enabling bluetooth support") + else() + add_definitions(-DHAVE_BLUEZ=0) + message("bluez NOT found, disabling bluetooth support") + endif() else() - add_definitions(-DHAVE_BLUEZ=0) - message("bluez NOT found, disabling bluetooth support") -endif(BLUEZ_FOUND) + message("bluez explicitly disabled, disabling bluetooth support") +endif() if(ENABLE_PULSEAUDIO) check_lib(PULSEAUDIO libpulse pulse QUIET)