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