Add CMake flag to activate loop backend
This commit is contained in:
parent
2538a6a3e6
commit
1f21cffb3e
2 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,8 @@ if(BLUETOOTH_ENABLED)
|
|||
add_subdirectory(backends/bluetooth)
|
||||
endif()
|
||||
|
||||
option(LOOPBACK_ENABLED "Loopback backend enabled" OFF)
|
||||
|
||||
set(kdeconnectcore_SRCS
|
||||
${backends_kdeconnect_SRCS}
|
||||
|
||||
|
@ -54,6 +56,10 @@ if (BLUETOOTH_ENABLED)
|
|||
target_link_libraries(kdeconnectcore PRIVATE Qt5::Bluetooth)
|
||||
endif()
|
||||
|
||||
if (LOOPBACK_ENABLED)
|
||||
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_LOOPBACK)
|
||||
endif()
|
||||
|
||||
set_target_properties(kdeconnectcore PROPERTIES
|
||||
VERSION ${KDECONNECT_VERSION}
|
||||
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
||||
|
|
|
@ -78,6 +78,9 @@ Daemon::Daemon(QObject* parent, bool testMode)
|
|||
#ifdef KDECONNECT_BLUETOOTH
|
||||
d->m_linkProviders.insert(new BluetoothLinkProvider());
|
||||
#endif
|
||||
#ifdef KDECONNECT_LOOPBACK
|
||||
d->m_linkProviders.insert(new LoopbackLinkProvider());
|
||||
#endif
|
||||
}
|
||||
|
||||
//Read remembered paired devices
|
||||
|
|
Loading…
Reference in a new issue