+ add_definitions(-DHAVE_KDE -DHAVE_KDE4 ${KDE4_DEFINITIONS})
+ set(WITH_KDE4 TRUE)
+endif()
+
+if (USE_QT5 AND WITH_KDE)
+ # If KDE Frameworks are present, they're most probably providing Qt5 integration including icon loading
+ set(EMBED_DATA OFF)
+
+ include(KDEInstallDirs)
+ include(KDECompilerSettings)
+ include(KDECMakeSettings)
+
+ add_definitions(-DHAVE_KDE -DHAVE_KF5)
+ set(WITH_KF5 TRUE)
+endif()
+
+# This needs to come after setting up KDE integration, so we can use KDE-specific paths
+include(QuasselInstallDirs)
+
+# Various config-dependent checks and settings
+#####################################################################
+
+if (NOT ZLIB_FOUND)
+ message(STATUS "zlib NOT found, using bundled miniz for compression")
+ if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+ message(STATUS "WARNING: This may be slow on 32 bit systems!")
+ endif()