Move TelepathyQt5 dependency into the plugin

Also drop KF5::Notifications from it
This commit is contained in:
Aleix Pol 2016-06-18 13:33:58 +02:00
parent e6349524bc
commit c521206b16
5 changed files with 17 additions and 12 deletions

View file

@ -14,8 +14,6 @@ find_package(Qt5 5.2 REQUIRED COMPONENTS Quick Gui)
find_package(KF5 REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons)
find_package(KF5DocTools)
find_package(Qca-qt5 2.1.0 REQUIRED)
find_package(TelepathyQt5 0.9.5)
find_package(TelepathyQt5Service 0.9.7)
include_directories(${CMAKE_SOURCE_DIR})

View file

@ -11,6 +11,7 @@ add_subdirectory(battery)
add_subdirectory(runcommand)
add_subdirectory(remotecommands)
add_subdirectory(findmyphone)
add_subdirectory(telepathy)
if(NOT WIN32)
add_subdirectory(sendnotifications)
add_subdirectory(pausemusic)
@ -24,9 +25,6 @@ if(EXPERIMENTALAPP_ENABLED)
add_subdirectory(remotecontrol)
add_subdirectory(lockdevice)
endif()
if (TelepathyQt5_FOUND AND TelepathyQt5Service_FOUND)
add_subdirectory(telepathy)
endif()
#FIXME: If we split notifications in several files, they won't appear in the same group in the Notifications KCM
install(FILES kdeconnect.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})

View file

@ -1,4 +1,17 @@
find_package(KF5 REQUIRED COMPONENTS Notifications)
find_package(TelepathyQt5 0.9.5)
find_package(TelepathyQt5Service 0.9.7)
set_package_properties(TelepathyQt5 PROPERTIES
PURPOSE "Allows integration with Telepathy. We suggest 'plugins/telepathy' to be packaged separately."
TYPE OPTIONAL
)
set_package_properties(TelepathyQt5Service PROPERTIES
PURPOSE "Allows integration with Telepathy. We suggest 'plugins/telepathy' to be packaged separately."
TYPE OPTIONAL
)
if (NOT TelepathyQt5Service_FOUND OR NOT TelepathyQt5_FOUND)
return()
endif()
include_directories(${CMAKE_BINARY_DIR})
@ -13,6 +26,6 @@ kdeconnect_add_plugin(kdeconnect_telepathy JSON kdeconnect_telepathy.json
target_link_libraries(kdeconnect_telepathy
kdeconnectcore
KF5::I18n
KF5::Notifications
Qt5::DBus
Qt5::Gui
)

View file

@ -4,7 +4,7 @@
"Authors": [
{
"Name": "David Edmundson",
"Email": "davidedmundson@kde.org",
"Email": "davidedmundson@kde.org"
}
],
"Description": "Show notifications for calls and SMS (answering coming soon)",

View file

@ -23,8 +23,6 @@
#include <QLoggingCategory>
#include <KNotification>
#include <core/kdeconnectplugin.h>
#include "kdeconnectinterface.h"
@ -49,8 +47,6 @@ private Q_SLOTS:
void sendSms(const QString& phoneNumber, const QString& messageBody);
private:
KNotification* createNotification(const NetworkPackage& np);
OrgFreedesktopTelepathyConnectionManagerKdeconnectInterface* m_telepathyInterface;
};