Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Make Bluetooth optional

This way we can merge this code in master with the hope of it getting
more attention.
parent 54ef8862
......@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 2.8.12)
find_package(ECM 0.0.9 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
find_package(Qt5 5.2 REQUIRED COMPONENTS Quick Bluetooth)
find_package(Qt5 5.2 REQUIRED COMPONENTS Quick)
find_package(KF5 REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons)
find_package(KF5DocTools)
......
......@@ -8,7 +8,12 @@ include_directories(
add_subdirectory(backends/lan)
add_subdirectory(backends/loopback)
add_subdirectory(backends/bluetooth)
option(BLUETOOTH_ENABLED "Bluetooth support for kdeconnect" OFF)
if(BLUETOOTH_ENABLED)
find_package(Qt5 REQUIRED COMPONENTS Bluetooth)
add_subdirectory(backends/bluetooth)
endif()
find_package(KF5Notifications 5.9 REQUIRED)
......@@ -39,7 +44,6 @@ PUBLIC
Qt5::Network
KF5::CoreAddons
qca-qt5
Qt5::Bluetooth
PRIVATE
Qt5::DBus
Qt5::Gui
......@@ -47,6 +51,11 @@ PRIVATE
KF5::ConfigCore
)
if (BLUETOOTH_ENABLED)
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_BLUETOOTH)
target_link_libraries(kdeconnectcore PRIVATE Qt5::Bluetooth)
endif()
set_target_properties(kdeconnectcore PROPERTIES
VERSION ${KDECONNECT_VERSION}
SOVERSION ${KDECONNECT_VERSION_MAJOR}
......
......@@ -28,7 +28,11 @@
#include "core_debug.h"
#include "kdeconnectconfig.h"
#include "networkpackage.h"
#include "backends/bluetooth/bluetoothlinkprovider.h"
#ifdef KDECONNECT_BLUETOOTH
#include "backends/bluetooth/bluetoothlinkprovider.h"
#endif
#include "backends/lan/lanlinkprovider.h"
#include "backends/loopback/loopbacklinkprovider.h"
#include "device.h"
......@@ -67,7 +71,9 @@ Daemon::Daemon(QObject *parent, bool testMode)
d->mLinkProviders.insert(new LoopbackLinkProvider());
else {
d->mLinkProviders.insert(new LanLinkProvider());
d->mLinkProviders.insert(new BluetoothLinkProvider());
#ifdef KDECONNECT_BLUETOOTH
d->mLinkProviders.insert(new BluetoothLinkProvider());
#endif
}
//Read remebered paired devices
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment