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)