Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: only look for Bluez on Linux #5368

Merged
merged 1 commit into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 13 additions & 10 deletions Source/Core/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,18 +326,21 @@ 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")
find_package(BlueZ)
if(BLUEZ_FOUND)
message(STATUS "BlueZ found, enabling bluetooth support")
set(SRCS ${SRCS} HW/WiimoteReal/IOLinux.cpp)
set(LIBS ${LIBS} BlueZ::BlueZ)
add_definitions(-DHAVE_BLUEZ=1)
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")
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()
message(STATUS "BlueZ NOT found, disabling bluetooth support")
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
endif()
else()
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
endif()

if(HIDAPI_FOUND)
Expand Down