1
0
Fork 0

Add CMake Linux install directives for the icons and the .desktop file

This commit is contained in:
Alessandro Menti 2017-05-20 15:03:25 +02:00
parent eb5d482ded
commit f1ffe97991
No known key found for this signature in database
GPG key ID: 467AC0B4D6A6F336
6 changed files with 27 additions and 0 deletions

View file

@ -527,7 +527,10 @@ else()
endif(ENABLE_TESTS)
add_subdirectory(src)
add_subdirectory(icons)
add_subdirectory(man)
add_subdirectory(package)
add_subdirectory(scripts)
#-----------------------------------------------------------------------------
### uninstall target

10
icons/CMakeLists.txt Normal file
View file

@ -0,0 +1,10 @@
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(FILES 16x16/apps/flightgear.png DESTINATION share/icons/hicolor/16x16/apps)
install(FILES 22x22/apps/flightgear.png DESTINATION share/icons/hicolor/22x22/apps)
install(FILES 24x24/apps/flightgear.png DESTINATION share/icons/hicolor/24x24/apps)
install(FILES 32x32/apps/flightgear.png DESTINATION share/icons/hicolor/32x32/apps)
install(FILES 48x48/apps/flightgear.png DESTINATION share/icons/hicolor/48x48/apps)
install(FILES 64x64/apps/flightgear.png DESTINATION share/icons/hicolor/64x64/apps)
install(FILES 128x128/apps/flightgear.png DESTINATION share/icons/hicolor/128x128/apps)
install(FILES scalable/apps/flightgear.svg DESTINATION share/icons/hicolor/scalable/apps)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

View file

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

3
package/CMakeLists.txt Normal file
View file

@ -0,0 +1,3 @@
if(ENABLE_QT AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(FILES org.flightgear.FlightGear.desktop DESTINATION share/applications)
endif(ENABLE_QT AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")

11
scripts/CMakeLists.txt Normal file
View file

@ -0,0 +1,11 @@
# Install bash and zsh completion files.
#
# The install path is not detected at runtime (contrary to what the
# bash-completion documentation suggests, see
# <https://github.com/scop/bash-completion/blob/master/README.md>) to account
# for those cases where the FlightGear installation prefix is not /usr.
# See <https://sourceforge.net/p/flightgear/flightgear/merge-requests/96/#e6f4>
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(FILES completion/fg-completion.bash DESTINATION share/bash-completion/completions RENAME fgfs)
install(FILES completion/fg-completion.zsh DESTINATION share/zsh/site-functions RENAME _fgfs)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")