Merge pull request #5368 from ligfx/bluezcmake

CMake: only look for Bluez on Linux
This commit is contained in:
Tilka 2017-05-04 00:32:44 +01:00 committed by GitHub
commit 2c817545fd
2 changed files with 13 additions and 11 deletions

View File

@ -24,7 +24,6 @@ option(ENABLE_ALSA "Enables ALSA 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:

View File

@ -326,7 +326,9 @@ elseif(UNIX)
endif()
# Bluez doesn't support all the communication modes on FreeBSD, so only using it on Linux
if(ENABLE_BLUEZ AND CMAKE_SYSTEM_NAME MATCHES "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
option(ENABLE_BLUEZ "Enables bluetooth support" ON)
if(ENABLE_BLUEZ)
find_package(BlueZ)
if(BLUEZ_FOUND)
message(STATUS "BlueZ found, enabling bluetooth support")
@ -336,8 +338,9 @@ if(ENABLE_BLUEZ AND CMAKE_SYSTEM_NAME MATCHES "Linux")
else()
message(STATUS "BlueZ NOT found, disabling bluetooth support")
endif()
else()
else()
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
endif()
endif()
if(HIDAPI_FOUND)