Install oxygen icon as application icon
[quassel.git] / icons / CMakeLists.txt
index 129bc88..5824c6e 100644 (file)
@@ -1,11 +1,18 @@
-# Build and/or install icons according to global settings
+# Install icons
+# We put them in DATA_INSTALL_DIR rather than ICON_INSTALL_DIR, to avoid
+# polluting the global namespace and to allow overriding
 
-if(QUASSEL_ICONS MATCHES "External")
-  install(DIRECTORY hicolor DESTINATION ${ICON_INSTALL_DIR})
-else(QUASSEL_ICONS MATCHES "External")
-#  set(CLIENT_DEPS ${CLIENT_DEPS} hicolor.qrc)
-endif(QUASSEL_ICONS MATCHES "External")
+if(EMBED_DATA)
+  set(CLIENT_RCS ${CLIENT_RCS} ../icons/hicolor.qrc ../icons/oxygen.qrc PARENT_SCOPE)
+else(EMBED_DATA)
+  install(DIRECTORY hicolor DESTINATION ${DATA_INSTALL_DIR}/quassel/icons)
+  install(DIRECTORY oxygen DESTINATION ${DATA_INSTALL_DIR}/quassel/icons)
+endif(EMBED_DATA)
 
-if(OXYGEN_ICONS MATCHES "Builtin")
-#  set(CLIENT_DEPS ${CLIENT_DEPS} oxygen.qrc)
-endif(OXYGEN_ICONS MATCHES "Builtin")
+# Application icon
+if(NOT APPLE AND NOT WIN32)
+  install(FILES oxygen/48x48/apps/quassel.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps)
+  if(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
+    install(FILES oxygen/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps)
+  endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
+endif(NOT APPLE AND NOT WIN32)