-if(OXYGEN_ICONS MATCHES "Builtin")
- set(CLIENT_DEPS ${CLIENT_DEPS} ../icons/qrc_oxygen.cxx)
- set_source_files_properties(../icons/qrc_oxygen.cxx PROPERTIES GENERATED true)
-endif(OXYGEN_ICONS MATCHES "Builtin")
+# Add resources. Can't be done in other subdirs apparently.
+# Note that these variables need to contain paths relative to src/ (this dir)
+qt_add_resources(CLIENT_DEPS ${CLIENT_RCS})
+qt_add_resources(CORE_DEPS ${CORE_RCS})
+qt_add_resources(COMMON_DEPS ${COMMON_RCS})
+
+# For Windows, Qt4 needs the QtMain module
+if (WIN32 AND NOT USE_QT5)
+ set(MAIN Main)
+endif()