summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-05-03 15:15:10 -0700
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-05-03 15:15:47 -0700
commit5230a8c996eb513efff52005af01fbfbaf5e0145 (patch)
tree519b3972d6019748a0984e984827f68517abd2ac /Source/Core
parenteaa4565e6374e6f903863585dedb629f8ba91019 (diff)
CMake: only look for Bluez on Linux
Stops CMake from saying "BlueZ NOT found, disabling bluetooth support" on other OSes. Windows, macOS, and Android support Bluetooth using other libraries. I'm not sure if non-Linux, non-Android Unices (like FreeBSD) need another message?
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/CMakeLists.txt23
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index a68a87d731..cdff1480ad 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -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)