From f68a9c4d7cafe8a1c024acfa8da59fed59932371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Mon, 18 Apr 2022 15:52:29 +0200 Subject: [PATCH] Right path for flatpak --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccb3f2b..9f40d95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,12 @@ if(UNIX) if(XDG-DESKTOP-MENU_EXECUTABLE) install(SCRIPT install.cmake) else() - install(FILES org.nou.tenmon.desktop DESTINATION "$ENV{FLATPAK_DEST}/usr/share/applications") - install(FILES org.nou.tenmon.png DESTINATION "$ENV{FLATPAK_DEST}/usr/share/icons/hicolor/32x32/apps") + if(DEFINED ENV{FLATPAK_DEST}) + install(FILES org.nou.tenmon.desktop DESTINATION "$ENV{FLATPAK_DEST}/share/applications") + install(FILES org.nou.tenmon.png DESTINATION "$ENV{FLATPAK_DEST}/share/icons/hicolor/32x32/apps") + else() + install(FILES org.nou.tenmon.desktop DESTINATION "/usr/share/applications") + install(FILES org.nou.tenmon.png DESTINATION "/usr/share/icons/hicolor/32x32/apps") + endif() endif() endif(UNIX)