icons: Fix message-quassel-tray-inverted icon
[quassel.git] / icons / CMakeLists.txt
1 # Install icons
2
3 if (WANT_MONO OR WANT_QTCLIENT)
4     set(BUNDLED_ICON_THEME_DIR ${CMAKE_SOURCE_DIR}/3rdparty/icons)
5
6     if (EMBED_DATA)
7         # Always embed quassel-specific icons
8         message(STATUS "Embedding Quassel-specific icons")
9         list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/breeze_icons.qrc)
10         list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/breeze_dark_icons.qrc)
11         list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/oxygen_icons.qrc)
12
13         if (WITH_BREEZE)
14             message(STATUS "Embedding bundled Breeze icon theme")
15             list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_icon_theme.qrc)
16         endif()
17         if (WITH_BREEZE_DARK)
18             message(STATUS "Embedding bundled Breeze Dark icon theme")
19             list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_dark_icon_theme.qrc)
20         endif()
21         if (WITH_OXYGEN)
22             message(STATUS "Embedding bundled Oxygen icon theme")
23             list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/oxygen_icon_theme.qrc)
24         endif()
25
26     else()
27         # Always install quassel-specific icons
28         install(DIRECTORY breeze breeze-dark oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
29
30         # Install bundled icon themes into our data dir (instead of CMAKE_INSTALL_ICONDIR) to avoid conflicts
31         # with themes provided by the system
32         if (WITH_BREEZE)
33             message(STATUS "Installing bundled Breeze icon theme")
34             install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/breeze DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
35         endif()
36         if (WITH_BREEZE_DARK)
37             message(STATUS "Installing bundled Breeze Dark icon theme")
38             install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/breeze-dark DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
39         endif()
40         if (WITH_OXYGEN)
41             message(STATUS "Installing bundled Oxygen icon theme")
42             install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
43         endif()
44     endif()
45
46     set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE)
47
48     # Application icon
49     if (HAVE_KDE OR (UNIX AND NOT APPLE))
50         # hicolor contains the application icon in all relevant sizes
51         install(DIRECTORY hicolor DESTINATION ${CMAKE_INSTALL_ICONDIR})
52
53         # For a system install, also copy to pixmaps
54         if (CMAKE_INSTALL_PREFIX STREQUAL "/usr")
55             install(FILES hicolor/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps)
56         endif()
57     endif()
58 endif()