X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=icons%2FCMakeLists.txt;h=77038531952474dd2d2876fe2eeb6d4c8c103fda;hb=aa039e8cc1ecff15a406d03fb64ea28986b968e1;hp=e7ed673a350e23197e322841966eec5d3053f85b;hpb=6310438a4efce3d2ecbd5faf1d3ceebe0c6524c2;p=quassel.git diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index e7ed673a..77038531 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -1,42 +1,58 @@ # 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 (WANT_MONO OR WANT_QTCLIENT) - set(ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/hicolor.qrc) # always embed those + set(BUNDLED_ICON_THEME_DIR ${CMAKE_SOURCE_DIR}/3rdparty/icons) if (EMBED_DATA) + # Always embed quassel-specific icons + message(STATUS "Embedding Quassel-specific icons") + list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/breeze_icons.qrc) + list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/breeze_dark_icons.qrc) + list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/oxygen_icons.qrc) + + if (WITH_BREEZE) + message(STATUS "Embedding bundled Breeze icon theme") + list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_icon_theme.qrc) + endif() + if (WITH_BREEZE_DARK) + message(STATUS "Embedding bundled Breeze Dark icon theme") + list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_dark_icon_theme.qrc) + endif() if (WITH_OXYGEN) - message(STATUS "Embedding bundled Oxygen icons") - set(ICON_RCS ${ICON_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/oxygen.qrc) + message(STATUS "Embedding bundled Oxygen icon theme") + list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/oxygen_icon_theme.qrc) endif() + else() - install(DIRECTORY hicolor DESTINATION ${ICON_INSTALL_DIR}) + # Always install quassel-specific icons + install(DIRECTORY breeze breeze-dark oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) + + # Install bundled icon themes into our data dir (instead of CMAKE_INSTALL_ICONDIR) to avoid conflicts + # with themes provided by the system + if (WITH_BREEZE) + message(STATUS "Installing bundled Breeze icon theme") + install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/breeze DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) + endif() + if (WITH_BREEZE_DARK) + message(STATUS "Installing bundled Breeze Dark icon theme") + install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/breeze-dark DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) + endif() if (WITH_OXYGEN) - message(STATUS "Installing bundled Oxygen icons") - install(DIRECTORY oxygen DESTINATION ${DATA_INSTALL_DIR}/quassel/icons) + message(STATUS "Installing bundled Oxygen icon theme") + install(DIRECTORY ${BUNDLED_ICON_THEME_DIR}/oxygen DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/icons) endif() endif() - if (NOT WITH_OXYGEN) - message(STATUS "Not installing bundled Oxygen icons") - endif() - set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE) -endif() -# Application icon + # Application icon + if (HAVE_KDE OR (UNIX AND NOT APPLE)) + # hicolor contains the application icon in all relevant sizes + install(DIRECTORY hicolor DESTINATION ${CMAKE_INSTALL_ICONDIR}) -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) + # For a system install, also copy to pixmaps + if (CMAKE_INSTALL_PREFIX STREQUAL "/usr") + install(FILES hicolor/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps) + endif() endif() endif()