diff --git a/CMakeLists.txt b/CMakeLists.txt index 638019e..6cea40d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,12 @@ include(GNUInstallDirs) set(LIBEXECDIR ${CMAKE_INSTALL_FULL_LIBEXECDIR}) configure_file(assets/hyprpolkitagent-service.in hyprpolkitagent.service @ONLY) +configure_file(assets/hyprpolkitagent-dbus.in hyprpolkitagent-dbus.service @ONLY) -install(TARGETS hyprpolkitagent DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}) +install(TARGETS hyprpolkitagent + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}) install(FILES ${CMAKE_BINARY_DIR}/hyprpolkitagent.service DESTINATION "lib/systemd/user") +install(FILES ${CMAKE_BINARY_DIR}/hyprpolkitagent-dbus.service + DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services + RENAME hyprpolkitagent.service) diff --git a/assets/hyprpolkitagent-dbus.in b/assets/hyprpolkitagent-dbus.in new file mode 100644 index 0000000..3afb670 --- /dev/null +++ b/assets/hyprpolkitagent-dbus.in @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=hyprpolkitagent +Exec=@LIBEXECDIR@/hyprpolkitagent +SystemdService=hyprpolkitagent.service