diff --git a/declarativeplugin/CMakeLists.txt b/declarativeplugin/CMakeLists.txt index ce6edada0..61b335fbb 100644 --- a/declarativeplugin/CMakeLists.txt +++ b/declarativeplugin/CMakeLists.txt @@ -1,17 +1,9 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - -set(kdeconnectdeclarativeplugin_SRC +add_library(kdeconnectdeclarativeplugin SHARED kdeconnectdeclarativeplugin.cpp responsewaiter.cpp objectfactory.cpp + resources.qrc ) - -qt5_add_resources(kdeconnectdeclarativeplugin_SRC resources.qrc) - -add_library(kdeconnectdeclarativeplugin SHARED ${kdeconnectdeclarativeplugin_SRC}) target_link_libraries(kdeconnectdeclarativeplugin Qt5::Qml kdeconnectinterfaces diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt index b9d126380..f43cc09ab 100644 --- a/kcm/CMakeLists.txt +++ b/kcm/CMakeLists.txt @@ -1,10 +1,5 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kcm") -include_directories(${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR}) - set(kcm_SRCS kcm.cpp ) @@ -19,6 +14,7 @@ target_link_libraries(kcm_kdeconnect KF5::I18n KF5::KCMUtils kdeconnectinterfaces + kdeconnectversion ) install(TARGETS kcm_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR}) diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 543e56b73..6d41d927f 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -13,8 +13,8 @@ #include #include "ui_kcm.h" -#include "interfaces/dbusinterfaces.h" -#include "interfaces/devicesmodel.h" +#include "dbusinterfaces.h" +#include "devicesmodel.h" #include "devicessortproxymodel.h" #include "kdeconnect-version.h" diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index 186dc2dba..4f6bb1e9e 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -1,4 +1,3 @@ -include_directories(${CMAKE_SOURCE_DIR}) add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio") set(debug_file_SRCS) diff --git a/kio/kiokdeconnect.h b/kio/kiokdeconnect.h index 21764d130..4f21f84dd 100644 --- a/kio/kiokdeconnect.h +++ b/kio/kiokdeconnect.h @@ -11,7 +11,7 @@ #include -#include "interfaces/dbusinterfaces.h" +#include "dbusinterfaces.h" class KioKdeconnect : public QObject, public KIO::SlaveBase { diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9b5396fb8..0300000e5 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,4 +1,3 @@ -include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/core) add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-plugins\") install(FILES kdeconnect_plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) diff --git a/plugins/mousepad/CMakeLists.txt b/plugins/mousepad/CMakeLists.txt index d6dc68afc..c085f2aa3 100644 --- a/plugins/mousepad/CMakeLists.txt +++ b/plugins/mousepad/CMakeLists.txt @@ -1,3 +1,5 @@ +kdeconnect_add_plugin(kdeconnect_mousepad JSON kdeconnect_mousepad.json SOURCES mousepadplugin.cpp abstractremoteinput.cpp) + if(UNIX AND NOT APPLE) find_package(KF5 ${KF5_MIN_VERSION} QUIET OPTIONAL_COMPONENTS Wayland) @@ -11,7 +13,7 @@ if(UNIX AND NOT APPLE) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras) find_package(XTest REQUIRED) find_package(X11 REQUIRED) - include_directories(${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS}) + target_include_directories(kdeconnect_mousepad ${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS}) endif() endif() @@ -21,10 +23,8 @@ set(HAVE_WAYLAND ${KF5Wayland_FOUND}) set(HAVE_MACOS ${APPLE}) configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h ) -kdeconnect_add_plugin(kdeconnect_mousepad JSON kdeconnect_mousepad.json SOURCES mousepadplugin.cpp abstractremoteinput.cpp) target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt5::Gui KF5::I18n) - if (HAVE_WINDOWS) target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp) endif() diff --git a/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt index bb616d471..2fe06c6d2 100644 --- a/plugins/telephony/CMakeLists.txt +++ b/plugins/telephony/CMakeLists.txt @@ -10,8 +10,6 @@ set(kdeconnect_telephony_SRCS ${debug_file_SRCS} ) -include_directories(${CMAKE_BINARY_DIR}) - kdeconnect_add_plugin(kdeconnect_telephony JSON kdeconnect_telephony.json SOURCES ${kdeconnect_telephony_SRCS}) target_link_libraries(kdeconnect_telephony diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt index 88b49979e..3fa16f703 100644 --- a/settings/CMakeLists.txt +++ b/settings/CMakeLists.txt @@ -1,9 +1,7 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings") -include_directories(${CMAKE_BINARY_DIR}) - add_executable(kdeconnect-settings main.cpp) -target_link_libraries(kdeconnect-settings KF5::I18n KF5::KCMUtils KF5::DBusAddons) +target_link_libraries(kdeconnect-settings kdeconnectversion KF5::I18n KF5::KCMUtils KF5::DBusAddons) install(TARGETS kdeconnect-settings ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES org.kde.kdeconnect.settings.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f42ff1855..9069867f0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,31 +1,18 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) -include_directories( - ${KDEConnectCore_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/.. - ${CMAKE_CURRENT_BINARY_DIR}/../plugins/sendnotifications/ - ${CMAKE_CURRENT_BINARY_DIR}/../smsapp/ -) - set(kdeconnect_libraries - kdeconnectcore + kdeconnectcore + kdeconnectversion KF5::I18n Qt5::DBus Qt5::Network Qt5::Test - ${Qca_LIBRARY} ) if(${KF5KIO_FOUND}) list(APPEND kdeconnect_libraries KF5::KIOWidgets) endif() -set(kdeconnect_sms_libraries - kdeconnectsmshelper - Qt5::Test -) - ecm_add_test(pluginloadtest.cpp LINK_LIBRARIES ${kdeconnect_libraries}) ecm_add_test(sendfiletest.cpp LINK_LIBRARIES ${kdeconnect_libraries}) ecm_add_test(testsocketlinereader.cpp TEST_NAME testsocketlinereader LINK_LIBRARIES ${kdeconnect_libraries})