From 8773243825c4d6ec450bc60f409bd7c41620cfdc Mon Sep 17 00:00:00 2001 From: Filippo Gentile Date: Thu, 28 Mar 2024 11:14:00 +0100 Subject: [PATCH] CMake: make .desktop path automatically generated --- autostart/CMakeLists.txt | 4 +++- ...qt-panel_wayland.desktop => lxqt-panel_wayland.desktop.in} | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) rename autostart/{lxqt-panel_wayland.desktop => lxqt-panel_wayland.desktop.in} (83%) diff --git a/autostart/CMakeLists.txt b/autostart/CMakeLists.txt index 2c9279a93..ffb441221 100644 --- a/autostart/CMakeLists.txt +++ b/autostart/CMakeLists.txt @@ -15,8 +15,10 @@ install(FILES COMPONENT Runtime ) +configure_file(lxqt-panel_wayland.desktop.in lxqt-panel_wayland.desktop @ONLY) + install(FILES - lxqt-panel_wayland.desktop + "${CMAKE_CURRENT_BINARY_DIR}/lxqt-panel_wayland.desktop" DESTINATION "/usr/share/applications" RENAME "lxqt-panel.desktop" COMPONENT Runtime diff --git a/autostart/lxqt-panel_wayland.desktop b/autostart/lxqt-panel_wayland.desktop.in similarity index 83% rename from autostart/lxqt-panel_wayland.desktop rename to autostart/lxqt-panel_wayland.desktop.in index 5b03e4120..62c914178 100644 --- a/autostart/lxqt-panel_wayland.desktop +++ b/autostart/lxqt-panel_wayland.desktop.in @@ -3,7 +3,7 @@ Type=Application TryExec=lxqt-panel # NOTE: KWin wants absolute path here, make sure it's correct -Exec=/usr/local/bin/lxqt-panel +Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/lxqt-panel # NOTE: adding KDE to make it work under Plasma Wayland session OnlyShowIn=LXQt;KDE