From 5c754bd994e71e7fef06939749d13fa9c7d44758 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 23 Jun 2016 11:25:57 +0000 Subject: [PATCH] Freedesktop: don't hardcode binary path in .desktop file. --- res/CMakeLists.txt | 5 ++++- .../{solvespace.desktop => solvespace.desktop.in} | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) rename res/freedesktop/{solvespace.desktop => solvespace.desktop.in} (77%) diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt index 5eb1b553..e30b6abe 100644 --- a/res/CMakeLists.txt +++ b/res/CMakeLists.txt @@ -120,7 +120,10 @@ elseif(APPLE) else() add_resource(freedesktop/solvespace-48x48.png) - install(FILES freedesktop/solvespace.desktop + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/freedesktop/solvespace.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/freedesktop/solvespace.desktop) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freedesktop/solvespace.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) foreach(SIZE 16x16 24x24 32x32 48x48) diff --git a/res/freedesktop/solvespace.desktop b/res/freedesktop/solvespace.desktop.in similarity index 77% rename from res/freedesktop/solvespace.desktop rename to res/freedesktop/solvespace.desktop.in index d2d7398c..68b3cb73 100644 --- a/res/freedesktop/solvespace.desktop +++ b/res/freedesktop/solvespace.desktop.in @@ -2,7 +2,7 @@ Version=1.0 Name=SolveSpace Comment=A parametric 2d/3d CAD -Exec=/usr/bin/solvespace +Exec=${CMAKE_INSTALL_FULL_BINDIR}/solvespace Icon=solvespace Type=Application Categories=Graphics