X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=icons%2FCMakeLists.txt;h=3eaea88a01ff101285a68609a4794734bf2be225;hp=5824c6ef7bf1bd7cc1a538665fd483125bc8a880;hb=36743995add34474fa2db3be8e7b37168232ac70;hpb=adcc6c4a43baae7bf388ce205a2b67776ada4e19 diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 5824c6ef..3eaea88a 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -2,17 +2,55 @@ # We put them in DATA_INSTALL_DIR rather than ICON_INSTALL_DIR, to avoid # polluting the global namespace and to allow overriding -if(EMBED_DATA) - set(CLIENT_RCS ${CLIENT_RCS} ../icons/hicolor.qrc ../icons/oxygen.qrc PARENT_SCOPE) -else(EMBED_DATA) - install(DIRECTORY hicolor DESTINATION ${DATA_INSTALL_DIR}/quassel/icons) - install(DIRECTORY oxygen DESTINATION ${DATA_INSTALL_DIR}/quassel/icons) -endif(EMBED_DATA) +if(WANT_MONO OR WANT_QTCLIENT) + + # Figure out if we want to install KDE's icons + # Starting with KDE 4.3, they shouldn't be needed anymore + set(INSTALL_OXY true) + string(TOUPPER ${WITH_OXYGEN} OXY_UPPER) + if(NOT OXY_UPPER) + set(INSTALL_OXY false) + elseif(OXY_UPPER MATCHES "AUTO") + if(HAVE_KDE) + if(KDE_VERSION VERSION_GREATER 4.2.99) + set(INSTALL_OXY false) + endif(KDE_VERSION VERSION_GREATER 4.2.99) + endif(HAVE_KDE) + endif(NOT OXY_UPPER) + + if(INSTALL_OXY) + message(STATUS "Installing Oxygen icons") + else(INSTALL_OXY) + message(STATUS "Not installing Oxygen icons") + endif(INSTALL_OXY) + + if(EMBED_DATA) + set(ICON_RCS ../icons/hicolor.qrc ../icons/oxygen.qrc) + if(INSTALL_OXY) + set(ICON_RCS ${ICON_RCS} ../icons/oxygen_kde.qrc) + endif(INSTALL_OXY) + set(CLIENT_RCS ${CLIENT_RCS} ${ICON_RCS} PARENT_SCOPE) + else(EMBED_DATA) + install(DIRECTORY hicolor DESTINATION ${ICON_INSTALL_DIR}) + install(DIRECTORY oxygen DESTINATION ${DATA_INSTALL_DIR}/quassel/icons) + if(INSTALL_OXY) + install(DIRECTORY oxygen_kde/ DESTINATION ${DATA_INSTALL_DIR}/quassel/icons/oxygen) + endif(INSTALL_OXY) + endif(EMBED_DATA) +endif(WANT_MONO OR WANT_QTCLIENT) # Application icon -if(NOT APPLE AND NOT WIN32) - install(FILES oxygen/48x48/apps/quassel.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps) + +# cmake-2.6.2 can't handle nested conditions +# if((UNIX AND NOT APPLE) OR HAVE_KDE) +if(HAVE_KDE OR UNIX) + if(HAVE_KDE OR NOT APPLE) + + install(FILES oxygen_kde/48x48/apps/quassel.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps) if(CMAKE_INSTALL_PREFIX STREQUAL "/usr") - install(FILES oxygen/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps) + install(FILES oxygen_kde/48x48/apps/quassel.png DESTINATION /usr/share/pixmaps) endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr") -endif(NOT APPLE AND NOT WIN32) + +# endif((UNIX AND NOT APPLE) OR HAVE_KDE) + endif(HAVE_KDE OR NOT APPLE) +endif(HAVE_KDE OR UNIX)