X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=icons%2FCMakeLists.txt;h=e7ed673a350e23197e322841966eec5d3053f85b;hb=6310438a4efce3d2ecbd5faf1d3ceebe0c6524c2;hp=3a04ba5768f7b1dd1593e9577a27af232b5737f2;hpb=5cfabc7f10123e0e4f03f76ef8ecbdd6c36df511;p=quassel.git diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 3a04ba57..e7ed673a 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -1,13 +1,42 @@ -# Build and/or install icons according to global settings +# Install icons +# +# We put the bundled oxygen icon theme in DATA_INSTALL_DIR rather than ICON_INSTALL_DIR, +# in order to avoid conflicts. As we add this directory to XDG_DATA_DIRS at runtime, +# the bundled theme will be found by Qt only if there is no oxygen theme installed +# in system directories. +# +# The hicolor folder contains icons vital for the Quassel UI (such as in the channel and nick +# lists). It is installed into the system icon directory (in order to allow overriding) and +# additionally always embedded as a fallback resource. -if(QUASSEL_ICONS MATCHES "External") - install(DIRECTORY hicolor DESTINATION ${ICON_INSTALL_DIR}) -else(QUASSEL_ICONS MATCHES "External") - qt4_add_resources(RC_ICONS hicolor.qrc) -endif(QUASSEL_ICONS MATCHES "External") +if (WANT_MONO OR WANT_QTCLIENT) + set(ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/hicolor.qrc) # always embed those -if(OXYGEN_ICONS MATCHES "Builtin") - qt4_add_resources(RC_ICONS oxygen.qrc) -endif(OXYGEN_ICONS MATCHES "Builtin") + if (EMBED_DATA) + if (WITH_OXYGEN) + message(STATUS "Embedding bundled Oxygen icons") + set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/oxygen.qrc) + endif() + else() + install(DIRECTORY hicolor DESTINATION ${ICON_INSTALL_DIR}) + if (WITH_OXYGEN) + message(STATUS "Installing bundled Oxygen icons") + install(DIRECTORY oxygen DESTINATION ${DATA_INSTALL_DIR}/quassel/icons) + endif() + endif() -add_custom_target(icons DEPENDS ${RC_ICONS}) + if (NOT WITH_OXYGEN) + message(STATUS "Not installing bundled Oxygen icons") + endif() + + set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE) +endif() + +# Application icon + +if (HAVE_KDE OR (UNIX AND NOT APPLE)) + install(FILES hicolor/48x48/apps/quassel.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps) + if (CMAKE_INSTALL_PREFIX STREQUAL "/usr") + install(FILES hicolor/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps) + endif() +endif()