Merge pull request #5368 from ligfx/bluezcmake
CMake: only look for Bluez on Linux
This commit is contained in:
commit
2c817545fd
|
@ -24,7 +24,6 @@ option(ENABLE_ALSA "Enables ALSA sound backend" ON)
|
||||||
option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON)
|
option(ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON)
|
||||||
option(ENABLE_OPENAL "Enables OpenAL sound backend" ON)
|
option(ENABLE_OPENAL "Enables OpenAL sound backend" ON)
|
||||||
option(ENABLE_LLVM "Enables LLVM support, for disassembly" 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
|
# Maintainers: if you consider blanket disabling this for your users, please
|
||||||
# consider the following points:
|
# consider the following points:
|
||||||
|
|
|
@ -326,18 +326,21 @@ elseif(UNIX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Bluez doesn't support all the communication modes on FreeBSD, so only using it on Linux
|
# 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")
|
||||||
find_package(BlueZ)
|
option(ENABLE_BLUEZ "Enables bluetooth support" ON)
|
||||||
if(BLUEZ_FOUND)
|
if(ENABLE_BLUEZ)
|
||||||
message(STATUS "BlueZ found, enabling bluetooth support")
|
find_package(BlueZ)
|
||||||
set(SRCS ${SRCS} HW/WiimoteReal/IOLinux.cpp)
|
if(BLUEZ_FOUND)
|
||||||
set(LIBS ${LIBS} BlueZ::BlueZ)
|
message(STATUS "BlueZ found, enabling bluetooth support")
|
||||||
add_definitions(-DHAVE_BLUEZ=1)
|
set(SRCS ${SRCS} HW/WiimoteReal/IOLinux.cpp)
|
||||||
|
set(LIBS ${LIBS} BlueZ::BlueZ)
|
||||||
|
add_definitions(-DHAVE_BLUEZ=1)
|
||||||
|
else()
|
||||||
|
message(STATUS "BlueZ NOT found, disabling bluetooth support")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "BlueZ NOT found, disabling bluetooth support")
|
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
|
||||||
endif()
|
endif()
|
||||||
else()
|
|
||||||
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HIDAPI_FOUND)
|
if(HIDAPI_FOUND)
|
||||||
|
|
Loading…
Reference in New Issue