X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=icons%2FCMakeLists.txt;h=35eae344aa3ab50a069ebd804779df265e3da750;hp=ca4df01a4d67f7cc5dc7dc25a705257a3ef66327;hb=HEAD;hpb=0216d4a650c02155b5bcd517567209f674d8a120 diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index ca4df01a..e6b70a4c 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -7,27 +7,30 @@ if (WANT_MONO OR WANT_QTCLIENT) set(BUNDLED_ICON_THEME_DIR ${CMAKE_SOURCE_DIR}/3rdparty/icons) - # Always embed a hicolor fallback containing the most important (e.g. tray) icons - list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/hicolor_icons.qrc) + # Always embed a hicolor fallback containing the most important (e.g. tray) icons. + # The .qrc contains aliases, so it's best to keep this manually written rather than autogenerated. + quassel_add_module(Resource::HicolorIcons STATIC) + target_sources(${TARGET} PRIVATE hicolor_icons.qrc) + set_target_properties(${TARGET} PROPERTIES AUTOMOC OFF AUTOUIC OFF) 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) + set(patterns breeze*/*.svg) if (WITH_OXYGEN_ICONS) - list(APPEND ICON_RCS ${CMAKE_CURRENT_SOURCE_DIR}/oxygen_icons.qrc) + list(APPEND patterns oxygen/*.png) endif() + quassel_add_resource(Icons PREFIX icons PATTERNS ${patterns}) if (WITH_BUNDLED_ICONS) message(STATUS "Embedding bundled Breeze icon theme") - list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_icon_theme.qrc) - list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/breeze_dark_icon_theme.qrc) + set(patterns breeze*/*.svg breeze*/index.theme) if (WITH_OXYGEN_ICONS) message(STATUS "Embedding bundled Oxygen icon theme") - list(APPEND ICON_RCS ${BUNDLED_ICON_THEME_DIR}/oxygen_icon_theme.qrc) + list(APPEND patterns oxygen/*.png oxygen/index.theme) endif() endif() + quassel_add_resource(IconThemes PREFIX icons PATTERNS ${patterns} BASEDIR ${BUNDLED_ICON_THEME_DIR}) else() # Always install quassel-specific icons @@ -51,8 +54,6 @@ if (WANT_MONO OR WANT_QTCLIENT) endif() endif() - set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE) - # Application icon if (HAVE_KDE OR (UNIX AND NOT APPLE)) # hicolor contains the application icon in all relevant sizes @@ -63,10 +64,5 @@ if (WANT_MONO OR WANT_QTCLIENT) # Install Quassel-specific ones from Oxygen into hicolor as fallback install(DIRECTORY oxygen/ DESTINATION ${CMAKE_INSTALL_ICONDIR}/hicolor) endif() - - # 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()