Install icon and .desktop file on Unix systems
authorJuhani Numminen <juhaninumminen0@gmail.com>
Sun, 22 Jan 2012 08:19:06 +0000 (10:19 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 28 Feb 2012 19:03:38 +0000 (21:03 +0200)
CMakeLists.txt

index ef9016526e9580ba6533e7a836bdee1667d4e673..f539b625df1f83a2de3a45b406eba9073b45cf0c 100644 (file)
@@ -64,12 +64,19 @@ elseif(UNIX) # Linux, BSD etc
        set(BINDIR "bin")
        set(DOCDIR "share/doc/${PROJECT_NAME}")
        set(EXAMPLE_CONF_DIR "share/doc/${PROJECT_NAME}")
+       set(XDG_APPS_DIR "share/applications")
+       set(ICONDIR "share/icons")
 endif()
 
 install(FILES "README.txt" DESTINATION "${DOCDIR}")
 install(FILES "doc/changelog.txt" DESTINATION "${DOCDIR}")
 install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}")
 
+if(UNIX)
+       install(FILES "misc/minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
+       install(FILES "minetest-icon.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
+endif()
+
 #
 # Subdirectories
 # Be sure to add all relevant definitions above this