add KNotifications to CMake

add notiffy config file
This commit is contained in:
Gaelle Braud 2026-03-24 16:51:28 +01:00
parent 745419014a
commit 35d0348ace
2 changed files with 31 additions and 1 deletions

View file

@ -30,6 +30,12 @@ find_package(Qt6 REQUIRED COMPONENTS Core)
find_package(Qt6 REQUIRED COMPONENTS ${QT_PACKAGES})
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
find_package(KF6Config REQUIRED)
find_package(KF6 REQUIRED COMPONENTS Notifications)
if(NOT WIN32)
find_package(X11)
endif()
@ -239,4 +245,16 @@ if (WIN32)
install(FILES "$<TARGET_PDB_FILE:${T}>" DESTINATION ${CMAKE_INSTALL_BINDIR})
endforeach ()
endif()
endif()
endif()
if(UNIX AND NOT APPLE)
# Linux : /usr/share/knotifications6/ ET ~/.local/share/knotifications6/
install(FILES linphone.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
install(FILES linphone.notifyrc DESTINATION "$ENV{HOME}/.local/share/knotifications6/")
elseif(WIN32)
# Windows : AppData/Local + AppData/Roaming
install(FILES linphone.notifyrc DESTINATION "data/knotifications6/" TYPE BIN)
elseif(APPLE)
# macOS : ~/Library/Application Support/linphone/knotifications6/
install(FILES linphone.notifyrc DESTINATION "linphone/knotifications6/" TYPE BIN)
endif()

View file

@ -0,0 +1,12 @@
[Global]
Title=Linphone
Name=Linphone
Comment=An encrypted communication app, French and open source
DesktopEntry=linphone
[Event/call]
Name=New call
Title=New call
Comment=Someone is calling you
Action=Popup
Urgency=Normal