Author: ivanovic
Date: Tue Apr 7 12:24:49 2009
New Revision: 34600
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34600&view=rev
Log:
add installation of .desktop files (and corresponding icons) to cmake recipe
Modified:
branches/1.6/CMakeLists.txt
Modified: branches/1.6/CMakeLists.txt
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/CMakeLists.txt?rev=34600&r1=34599&r2=34600&view=diff
==============================================================================
--- branches/1.6/CMakeLists.txt (original)
+++ branches/1.6/CMakeLists.txt Tue Apr 7 12:24:49 2009
@@ -69,7 +69,11 @@
option(ENABLE_NLS "Enable building of tranlations" ON)
option(ENABLE_POOL_ALLOC "Enable custom pool malloc" OFF)
option(ENABLE_LOW_MEM "Reduce memory usage by removing extra functionality"
OFF)
-
+if (UNIX)
+ option(ENABLE_DESKTOP_ENTRY "enable installation of desktop entry files" ON)
+ set(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE STRING "Sets the icon directory
for desktop entry to a non-default location.")
+ set(DESKTOPDIR "${DATAROOTDIR}/applications/" CACHE STRING "Sets the desktop
file directory for desktop entry to a non-default location.")
+endif(UNIX)
set(BINARY_SUFFIX "" CACHE STRING "Suffix behind all binaries")
set(BINARY_PREFIX "" CACHE STRING "Prefix in front of all binaries")
@@ -249,6 +253,19 @@
endif()
+#
+# Install .desktop entries
+#
+if(ENABLE_DESKTOP_ENTRY)
+ # install a desktop file so wesnoth appears in the application start menu
with an icon
+ install(FILES icons/wesnoth.desktop DESTINATION ${DESKTOPDIR} )
+ install(FILES icons/wesnoth-icon.png DESTINATION ${ICONDIR} )
+ if(ENABLE_EDITOR)
+ install(FILES icons/wesnoth_editor.desktop DESTINATION ${DESKTOPDIR} )
+ install(FILES icons/wesnoth_editor-icon.png DESTINATION ${ICONDIR} )
+ endif(ENABLE_EDITOR)
+endif(ENABLE_DESKTOP_ENTRY)
+
if(ENABLE_SERVER AND FIFO_DIR)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory
\$ENV{DESTDIR}/${FIFO_DIR})")
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits