diff --git a/Linphone/CMakeLists.txt b/Linphone/CMakeLists.txt index 19d324f91..3c2b5a4d3 100644 --- a/Linphone/CMakeLists.txt +++ b/Linphone/CMakeLists.txt @@ -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 "$" DESTINATION ${CMAKE_INSTALL_BINDIR}) endforeach () endif() -endif() \ No newline at end of file +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() diff --git a/Linphone/linphone.notifyrc b/Linphone/linphone.notifyrc new file mode 100644 index 000000000..75972ce42 --- /dev/null +++ b/Linphone/linphone.notifyrc @@ -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 \ No newline at end of file