Add a README to the icons folder
[quassel.git] / icons / CMakeLists.txt
1 # Install icons
2 #
3 # We put the bundled oxygen icon theme in DATADIR rather than ICONDIR,
4 # in order to avoid conflicts. As we add this directory to XDG_DATA_DIRS at runtime,
5 # the bundled theme will be found by Qt only if there is no oxygen theme installed
6 # in system directories.
7 #
8 # The hicolor folder contains icons vital for the Quassel UI (such as in the channel and nick
9 # lists). It is installed into the system icon directory (in order to allow overriding) and
10 # additionally always embedded as a fallback resource.
11
12 if (WANT_MONO OR WANT_QTCLIENT)
13     set(ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/hicolor.qrc) # always embed those
14
15     if (NOT WITH_OXYGEN)
16         message(STATUS "Not installing bundled Oxygen icons")
17     endif()
18
19     if (NOT WITH_BREEZE)
20         message(STATUS "Not installing bundled Breeze icons")
21     endif()
22
23     if (NOT WITH_BREEZE_DARK)
24         message(STATUS "Not installing bundled Breeze Dark icons")
25     endif()
26
27     if (EMBED_DATA)
28         if (WITH_OXYGEN)
29             message(STATUS "Embedding bundled Oxygen icons")
30             set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/oxygen.qrc)
31         endif()
32         if (WITH_BREEZE)
33             message(STATUS "Embedding bundled Breeze icons")
34             set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breeze.qrc)
35         endif()
36         if (WITH_BREEZE_DARK)
37             message(STATUS "Embedding bundled Breeze Dark icons")
38             set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breezedark.qrc)
39         endif()
40
41         message(STATUS "Embedding some extra Oxygen styled icons")
42         set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/oxygen-extra.qrc)
43
44         message(STATUS "Embedding some extra Breeze styled icons")
45         set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breeze-extra.qrc)
46
47         message(STATUS "Embedding some extra Breeze Dark styled icons")
48         set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/breezedark-extra.qrc)
49
50     else()
51         install(DIRECTORY hicolor DESTINATION ${CMAKE_INSTALL_ICONDIR})
52         if (WITH_OXYGEN)
53             message(STATUS "Installing bundled Oxygen icons")
54             install(DIRECTORY oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
55         endif()
56         if (WITH_BREEZE)
57             message(STATUS "Installing bundled Breeze icons")
58             install(DIRECTORY breeze DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
59         endif()
60         if (WITH_BREEZE_DARK)
61             message(STATUS "Installing bundled Breeze Dark icons")
62             install(DIRECTORY breezedark DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons)
63         endif()
64
65         message(STATUS "Installing some extra bundled Oxygen styled icons")
66         install(DIRECTORY extra-icons/oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons/extra)
67
68         message(STATUS "Installing some extra bundled Breeze styled icons")
69         install(DIRECTORY extra-icons/breeze DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons/extra)
70
71         message(STATUS "Installing some extra bundled Breeze Dark styled icons")
72         install(DIRECTORY extra-icons/breezedark DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons/extra)
73     endif()
74
75     set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE)
76
77     # Application icon
78     if (HAVE_KDE OR (UNIX AND NOT APPLE))
79         install(FILES hicolor/48x48/apps/quassel.png DESTINATION ${CMAKE_INSTALL_ICONDIR}/hicolor/48x48/apps)
80         if (CMAKE_INSTALL_PREFIX STREQUAL "/usr")
81             install(FILES hicolor/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps)
82         endif()
83     endif()
84 endif()