diff options
| author | Tilka <tilkax@gmail.com> | 2017-05-04 00:32:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-04 00:32:44 +0100 |
| commit | 2c817545fd63a105388d3886de2aa343b84cc73b (patch) | |
| tree | eb4b1f61bf9b78dd8b42d460d785470760d188de /Source/Core | |
| parent | b0fdd81f45f8ad2ed0f824423651fe78e63f324d (diff) | |
| parent | 5230a8c996eb513efff52005af01fbfbaf5e0145 (diff) | |
Merge pull request #5368 from ligfx/bluezcmake
CMake: only look for Bluez on Linux
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/CMakeLists.txt | 23 |
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) |
