cmake: install a desktop entry on linux/{free,open,net}bsd/whatever

This commit is contained in:
a dinosaur 2019-10-11 16:22:53 +11:00
parent 94cae4b506
commit 8c7cdffa87
2 changed files with 19 additions and 1 deletions

View file

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.1)
project(DobieStation)
project(DobieStation
VERSION 0.1.0)
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR
${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR
@ -53,3 +54,10 @@ if (MSVC)
endif()
install(TARGETS DobieQt DESTINATION bin)
if (UNIX AND NOT APPLE)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/data/DobieStation.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/DobieStation.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DobieStation.desktop DESTINATION share/applications/)
endif()

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Version=@PROJECT_VERSION@
Name=DobieStation
GenericName=PlayStation 2 Emulator
Comment=A dog-themed PS2 emulator
Icon=
TryExec=DobieStation
Exec=DobieStation
Categories=Game;Emulator;