From f1ffe979913b4eed4126c45ca4ed1bbe2ce6bdc3 Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Sat, 20 May 2017 15:03:25 +0200 Subject: [PATCH] Add CMake Linux install directives for the icons and the .desktop file --- CMakeLists.txt | 3 +++ icons/CMakeLists.txt | 10 ++++++++++ icons/scalable/{ => apps}/fgcom.svg | 0 icons/scalable/{ => apps}/flightgear.svg | 0 package/CMakeLists.txt | 3 +++ scripts/CMakeLists.txt | 11 +++++++++++ 6 files changed, 27 insertions(+) create mode 100644 icons/CMakeLists.txt rename icons/scalable/{ => apps}/fgcom.svg (100%) rename icons/scalable/{ => apps}/flightgear.svg (100%) create mode 100644 package/CMakeLists.txt create mode 100644 scripts/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 9caa653b5..f9da189cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 000000000..d8ba9cac2 --- /dev/null +++ b/icons/CMakeLists.txt @@ -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") diff --git a/icons/scalable/fgcom.svg b/icons/scalable/apps/fgcom.svg similarity index 100% rename from icons/scalable/fgcom.svg rename to icons/scalable/apps/fgcom.svg diff --git a/icons/scalable/flightgear.svg b/icons/scalable/apps/flightgear.svg similarity index 100% rename from icons/scalable/flightgear.svg rename to icons/scalable/apps/flightgear.svg diff --git a/package/CMakeLists.txt b/package/CMakeLists.txt new file mode 100644 index 000000000..b92f0ac91 --- /dev/null +++ b/package/CMakeLists.txt @@ -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") diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 000000000..b61db7ba4 --- /dev/null +++ b/scripts/CMakeLists.txt @@ -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 +# ) to account +# for those cases where the FlightGear installation prefix is not /usr. +# See +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")