kdeconnect_daemon: conditionally configure the daemon service to better support the windows port

BUG 412665
This commit is contained in:
Piyush Aggarwal 2020-11-10 01:58:47 +05:30
parent 56e70904c9
commit b7ad218c66
2 changed files with 8 additions and 1 deletions

View file

@ -19,6 +19,13 @@ target_link_libraries(kdeconnectd
ecm_mark_nongui_executable(kdeconnectd)
configure_file(org.kde.kdeconnect.daemon.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop)
# Conditionally configure the daemon service according to the target OS
if(WIN32)
set(SERV_EXEC kdeconnectd)
else()
set(SERV_EXEC ${KDE_INSTALL_FULL_LIBEXECDIR}/kdeconnectd)
endif()
configure_file(org.kde.kdeconnect.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.daemon.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})

View file

@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.kde.kdeconnect
Exec=@KDE_INSTALL_FULL_LIBEXECDIR@/kdeconnectd
Exec=@SERV_EXEC@