CMake: on UNIX, install .desktop and appdata files

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
master
Paul Cercueil 2019-01-05 20:21:49 -03:00
parent 6b1224ab07
commit 8d2447099d
2 changed files with 12 additions and 1 deletions

View File

@ -262,3 +262,14 @@ if (WIN32)
fixup_bundle(\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/pioneer.exe\" \"\" \"${CMAKE_PROGRAM_PATH}\")"
COMPONENT Runtime)
endif (WIN32)
if (UNIX)
set(PIONEER_DESKTOP_FILE ${CMAKE_BINARY_DIR}/metadata/net.pioneerspacesim.Pioneer.desktop)
configure_file(metadata/net.pioneerspacesim.Pioneer.desktop.cmakein ${PIONEER_DESKTOP_FILE} @ONLY)
install(FILES ${PIONEER_DESKTOP_FILE}
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
)
install(FILES metadata/net.pioneerspacesim.Pioneer.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATADIR}/appdata
)
endif (UNIX)

View File

@ -3,7 +3,7 @@ Version=1.0
Name=Pioneer
GenericName=Pioneer Space Simulator
Comment=A game of lonely space adventure
Exec=pioneer
Exec=@CMAKE_INSTALL_FULL_BINDIR@/pioneer
Icon=net.pioneerspacesim.Pioneer
Terminal=false
Type=Application