Skip to content

Commit 15e3322

Browse files
committed
build: generate exec and icon paths in desktop entry dynamically.
1 parent 5662254 commit 15e3322

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,5 +861,10 @@ if(UNIX AND NOT APPLE)
861861
install(DIRECTORY ${CMAKE_SOURCE_DIR}/files DESTINATION share/APMPlanner2)
862862
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data DESTINATION share/APMPlanner2)
863863
install(DIRECTORY ${CMAKE_SOURCE_DIR}/qml DESTINATION share/APMPlanner2)
864+
configure_file(
865+
${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop.in
866+
${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop
867+
@ONLY
868+
)
864869
install(FILES ${CMAKE_SOURCE_DIR}/common/apmplanner2.desktop DESTINATION share/applications)
865870
endif()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Type=Application
33
Name=APM Planner 2
44
GenericName=apmplanner2
5-
Exec=/usr/bin/apmplanner2
5+
Exec=@CMAKE_INSTALL_PREFIX@/bin/apmplanner2
66
Terminal=false
77
Categories=Education;Robotics;
88
Comment=An open-source ground station application for MAVlink based autopilots
9-
Icon=/usr/share/APMPlanner2/files/APMIcons/ap_rc.png
9+
Icon=@CMAKE_INSTALL_PREFIX@/share/APMPlanner2/files/APMIcons/ap_rc.png
1010

0 commit comments

Comments
 (0)