Clean up includes

This commit is contained in:
Nicolas Fella 2019-04-30 19:03:24 +02:00
parent 5b73c081da
commit d4026861ab
18 changed files with 39 additions and 31 deletions

View file

@ -57,8 +57,6 @@ set_package_properties(KF5Kirigami2 PROPERTIES
TYPE RUNTIME TYPE RUNTIME
) )
include_directories(${CMAKE_SOURCE_DIR})
configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h) configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h)
include(KDEInstallDirs) include(KDEInstallDirs)
@ -72,7 +70,6 @@ include(FeatureSummary)
include(KDEConnectMacros.cmake) include(KDEConnectMacros.cmake)
include(GenerateExportHeader) include(GenerateExportHeader)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(core) add_subdirectory(core)
if(NOT SAILFISHOS) if(NOT SAILFISHOS)

View file

@ -3,6 +3,8 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-cli\")
add_executable(kdeconnect-cli kdeconnect-cli.cpp) add_executable(kdeconnect-cli kdeconnect-cli.cpp)
ecm_mark_nongui_executable(kdeconnect-cli) ecm_mark_nongui_executable(kdeconnect-cli)
target_include_directories(kdeconnect-cli PUBLIC ${CMAKE_BINARY_DIR})
target_link_libraries(kdeconnect-cli target_link_libraries(kdeconnect-cli
kdeconnectinterfaces kdeconnectinterfaces
KF5::CoreAddons KF5::CoreAddons

View file

@ -39,6 +39,9 @@ set(kdeconnectcore_SRCS
) )
add_library(kdeconnectcore ${kdeconnectcore_SRCS}) add_library(kdeconnectcore ${kdeconnectcore_SRCS})
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
target_link_libraries(kdeconnectcore target_link_libraries(kdeconnectcore
PUBLIC PUBLIC
Qt5::Network Qt5::Network
@ -65,7 +68,6 @@ set_target_properties(kdeconnectcore PROPERTIES
SOVERSION ${KDECONNECT_VERSION_MAJOR} SOVERSION ${KDECONNECT_VERSION_MAJOR}
) )
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
generate_export_header(kdeconnectcore EXPORT_FILE_NAME kdeconnectcore_export.h BASE_NAME KDEConnectCore) generate_export_header(kdeconnectcore EXPORT_FILE_NAME kdeconnectcore_export.h BASE_NAME KDEConnectCore)
install(TARGETS kdeconnectcore EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) install(TARGETS kdeconnectcore EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)

View file

@ -23,7 +23,7 @@
#include <QObject> #include <QObject>
#include "core/networkpacket.h" #include "networkpacket.h"
class PairingHandler; class PairingHandler;
class NetworkPacket; class NetworkPacket;

View file

@ -23,7 +23,7 @@
#include <QObject> #include <QObject>
#include "core/networkpacket.h" #include "networkpacket.h"
#include "pairinghandler.h" #include "pairinghandler.h"
class DeviceLink; class DeviceLink;

View file

@ -3,6 +3,7 @@ project(kdeconnectd)
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded") add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded")
add_executable(kdeconnectd kdeconnectd.cpp) add_executable(kdeconnectd kdeconnectd.cpp)
target_include_directories(kdeconnectd PUBLIC ${CMAKE_BINARY_DIR})
target_link_libraries(kdeconnectd kdeconnectcore KF5::KIOWidgets KF5::DBusAddons KF5::Notifications KF5::I18n Qt5::Widgets) target_link_libraries(kdeconnectd kdeconnectcore KF5::KIOWidgets KF5::DBusAddons KF5::Notifications KF5::I18n Qt5::Widgets)
ecm_mark_nongui_executable(kdeconnectd) ecm_mark_nongui_executable(kdeconnectd)

View file

@ -15,6 +15,7 @@ ecm_add_app_icon(indicator_SRCS ICONS
) )
add_executable(kdeconnect-indicator ${indicator_SRCS}) add_executable(kdeconnect-indicator ${indicator_SRCS})
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_BINARY_DIR})
target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces) target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces)
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -64,6 +64,8 @@ set_target_properties(kdeconnectinterfaces PROPERTIES
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces) generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
target_include_directories(kdeconnectinterfaces PUBLIC ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(kdeconnectinterfaces target_link_libraries(kdeconnectinterfaces
LINK_PUBLIC LINK_PUBLIC
Qt5::Gui Qt5::Gui

View file

@ -23,7 +23,7 @@
#include <QDBusMetaType> #include <QDBusMetaType>
#include "interfaces/kdeconnectinterfaces_export.h" #include "kdeconnectinterfaces_export.h"
class KDECONNECTINTERFACES_EXPORT ConversationMessage class KDECONNECTINTERFACES_EXPORT ConversationMessage
{ {

View file

@ -21,24 +21,24 @@
#ifndef DBUSINTERFACES_H #ifndef DBUSINTERFACES_H
#define DBUSINTERFACES_H #define DBUSINTERFACES_H
#include "interfaces/kdeconnectinterfaces_export.h" #include "kdeconnectinterfaces_export.h"
#include "interfaces/daemoninterface.h" #include "daemoninterface.h"
#include "interfaces/deviceinterface.h" #include "deviceinterface.h"
#include "interfaces/devicebatteryinterface.h" #include "devicebatteryinterface.h"
#include "interfaces/devicesftpinterface.h" #include "devicesftpinterface.h"
#include "interfaces/devicefindmyphoneinterface.h" #include "devicefindmyphoneinterface.h"
#include "interfaces/devicenotificationsinterface.h" #include "devicenotificationsinterface.h"
#include "interfaces/notificationinterface.h" #include "notificationinterface.h"
#include "interfaces/mprisremoteinterface.h" #include "mprisremoteinterface.h"
#include "interfaces/remotecontrolinterface.h" #include "remotecontrolinterface.h"
#include "interfaces/lockdeviceinterface.h" #include "lockdeviceinterface.h"
#include "interfaces/remotecommandsinterface.h" #include "remotecommandsinterface.h"
#include "interfaces/remotekeyboardinterface.h" #include "remotekeyboardinterface.h"
#include "interfaces/smsinterface.h" #include "smsinterface.h"
#include "interfaces/conversationsinterface.h" #include "conversationsinterface.h"
#include "interfaces/shareinterface.h" #include "shareinterface.h"
#include "interfaces/remotesystemvolumeinterface.h" #include "remotesystemvolumeinterface.h"
/** /**
* Using these "proxy" classes just in case we need to rename the * Using these "proxy" classes just in case we need to rename the

View file

@ -25,7 +25,7 @@
#include <QPixmap> #include <QPixmap>
#include <QList> #include <QList>
#include "interfaces/kdeconnectinterfaces_export.h" #include "kdeconnectinterfaces_export.h"
class QDBusPendingCallWatcher; class QDBusPendingCallWatcher;
class DaemonDbusInterface; class DaemonDbusInterface;

View file

@ -20,8 +20,8 @@
#include "devicessortproxymodel.h" #include "devicessortproxymodel.h"
#include <interfaces/dbusinterfaces.h> #include "dbusinterfaces.h"
#include <interfaces/devicesmodel.h> #include "devicesmodel.h"
DevicesSortProxyModel::DevicesSortProxyModel(DevicesModel* devicesModel) DevicesSortProxyModel::DevicesSortProxyModel(DevicesModel* devicesModel)
: QSortFilterProxyModel(devicesModel) : QSortFilterProxyModel(devicesModel)

View file

@ -22,7 +22,7 @@
#define DEVICESSORTPROXYMODEL_H #define DEVICESSORTPROXYMODEL_H
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include "interfaces/kdeconnectinterfaces_export.h" #include "kdeconnectinterfaces_export.h"
class DevicesModel; class DevicesModel;

View file

@ -26,7 +26,7 @@
#include <QPixmap> #include <QPixmap>
#include <QList> #include <QList>
#include "interfaces/dbusinterfaces.h" #include "dbusinterfaces.h"
class KDECONNECTINTERFACES_EXPORT NotificationsModel class KDECONNECTINTERFACES_EXPORT NotificationsModel
: public QAbstractListModel : public QAbstractListModel

View file

@ -23,7 +23,7 @@
#include <QAbstractListModel> #include <QAbstractListModel>
#include "interfaces/dbusinterfaces.h" #include "dbusinterfaces.h"
struct Command { struct Command {
QString key; QString key;

View file

@ -23,7 +23,7 @@
#include <QAbstractListModel> #include <QAbstractListModel>
#include "interfaces/dbusinterfaces.h" #include "dbusinterfaces.h"
struct Sink { struct Sink {
QString name; QString name;

View file

@ -3,6 +3,7 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
include_directories( include_directories(
${KDEConnectCore_BINARY_DIR} ${KDEConnectCore_BINARY_DIR}
${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/plugins/sendnotifications/ ${CMAKE_BINARY_DIR}/plugins/sendnotifications/
) )

View file

@ -2,6 +2,8 @@ ki18n_wrap_ui(telhandler_SRCS dialog.ui)
add_executable(kdeconnect-handler kdeconnect-handler.cpp ${telhandler_SRCS}) add_executable(kdeconnect-handler kdeconnect-handler.cpp ${telhandler_SRCS})
target_include_directories(kdeconnect-handler PUBLIC ${CMAKE_BINARY_DIR})
target_link_libraries(kdeconnect-handler target_link_libraries(kdeconnect-handler
kdeconnectinterfaces kdeconnectinterfaces
Qt5::Widgets Qt5::Widgets