diff --git a/CMakeLists.txt b/CMakeLists.txt index e1194fe146..4e74d01085 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -861,5 +861,10 @@ if(UNIX AND NOT APPLE) install(DIRECTORY ${CMAKE_SOURCE_DIR}/files DESTINATION share/APMPlanner2) install(DIRECTORY ${CMAKE_SOURCE_DIR}/data DESTINATION share/APMPlanner2) install(DIRECTORY ${CMAKE_SOURCE_DIR}/qml DESTINATION share/APMPlanner2) + configure_file( + ${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop.in + ${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop + @ONLY + ) install(FILES ${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop DESTINATION share/applications) endif() diff --git a/common/apmplanner2.desktop b/common/apmplanner2.desktop.in similarity index 63% rename from common/apmplanner2.desktop rename to common/apmplanner2.desktop.in index 215d396ab9..3e71d36666 100644 --- a/common/apmplanner2.desktop +++ b/common/apmplanner2.desktop.in @@ -2,9 +2,9 @@ Type=Application Name=APM Planner 2 GenericName=apmplanner2 -Exec=/usr/bin/apmplanner2 +Exec=@CMAKE_INSTALL_PREFIX@/bin/apmplanner2 Terminal=false Categories=Education;Robotics; Comment=An open-source ground station application for MAVlink based autopilots -Icon=/usr/share/APMPlanner2/files/APMIcons/ap_rc.png +Icon=@CMAKE_INSTALL_PREFIX@/share/APMPlanner2/files/APMIcons/ap_rc.png