Set path to kdeconnectd executable through cmake
Libexec binaries need to be hardcoded, otherwise they are not found. This commit creates a config file and sets the path there. REVIEW: 119148
This commit is contained in:
parent
0f334d053f
commit
685e821d0a
3 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
1
kded/config-kded.h.cmake
Normal file
1
kded/config-kded.h.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
#define KDECONNECTD_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kdeconnectd"
|
|
@ -26,6 +26,7 @@
|
|||
#include <KStandardDirs>
|
||||
|
||||
#include "core/kdebugnamespace.h"
|
||||
#include "config-kded.h"
|
||||
|
||||
K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin<Kded>();)
|
||||
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()));
|
||||
|
|
Loading…
Reference in a new issue