Add DBus service for NeoChat and link to KUnifiedPush if found

This commit is contained in:
Joshua Goins
2023-11-09 16:34:55 -05:00
parent 1a3055df86
commit 7735313b0c
2 changed files with 15 additions and 1 deletions

View File

@@ -483,9 +483,18 @@ if (TARGET KF6::KIOWidgets)
target_compile_definitions(neochat PUBLIC -DHAVE_KIO)
endif()
if (TARGET KUnifiedPush)
target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH)
target_link_libraries(neochat PUBLIC KUnifiedPush)
if (NOT ANDROID)
configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
endif()
endif()
install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
endif()

View File

@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
[D-BUS Service]
Name=org.kde.neochat
Exec=@CMAKE_INSTALL_PREFIX@/bin/neochat --notify