diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt index dd2c94146..3f1569345 100644 --- a/kded/CMakeLists.txt +++ b/kded/CMakeLists.txt @@ -1,5 +1,7 @@ include_directories(${CMAKE_SOURCE_DIR}) +configure_file(config-kded.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kded.h) + add_executable(kdeconnectd kdeconnectd.cpp) target_link_libraries(kdeconnectd kdeconnectcore KF5::ConfigWidgets) diff --git a/kded/config-kded.h.cmake b/kded/config-kded.h.cmake new file mode 100644 index 000000000..10882b7e9 --- /dev/null +++ b/kded/config-kded.h.cmake @@ -0,0 +1 @@ +#define KDECONNECTD_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kdeconnectd" diff --git a/kded/kded.cpp b/kded/kded.cpp index a7c5c7540..8e3e06cb4 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -26,6 +26,7 @@ #include #include "core/kdebugnamespace.h" +#include "config-kded.h" K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin();) K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect-kded")) @@ -50,7 +51,7 @@ void Kded::start() return; } - const QString daemon = KStandardDirs::locate("exe", "kdeconnectd"); + const QString daemon = QStringLiteral(KDECONNECTD_BIN); kDebug(debugArea()) << "Starting daemon " << daemon; m_daemon = new KProcess(this); connect(m_daemon, SIGNAL(started()), SLOT(daemonStarted()));