cmake: Clean up icon-related build options
[quassel.git] / src / common / main.cpp
index accffc6..6a36e54 100644 (file)
 #include <cstdlib>
 #include <memory>
 
+#ifdef HAVE_UMASK
+#  include <sys/types.h>
+#  include <sys/stat.h>
+#endif /* HAVE_UMASK */
+
 #include <QTextCodec>
 
 #ifdef BUILD_CORE
@@ -68,6 +73,10 @@ Q_IMPORT_PLUGIN(qgif)
 
 int main(int argc, char **argv)
 {
+#ifdef HAVE_UMASK
+    umask(S_IRWXG | S_IRWXO);
+#endif
+
 #if QT_VERSION < 0x050000
     // All our source files are in UTF-8, and Qt5 even requires that
     QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
@@ -91,22 +100,24 @@ int main(int argc, char **argv)
 #endif
 #ifndef BUILD_CORE
     Q_INIT_RESOURCE(pics);
-    Q_INIT_RESOURCE(hicolor);
 #endif
 
 #ifdef EMBED_DATA
     Q_INIT_RESOURCE(i18n);
 # ifndef BUILD_CORE
     Q_INIT_RESOURCE(data);
-#   ifdef WITH_OXYGEN
-    Q_INIT_RESOURCE(oxygen);
-#   endif
-#   ifdef WITH_BREEZE
-    Q_INIT_RESOURCE(breeze);
-#   endif
-#   ifdef WITH_BREEZE_DARK
-    Q_INIT_RESOURCE(breezedark);
+    Q_INIT_RESOURCE(breeze_icons);
+    Q_INIT_RESOURCE(breeze_dark_icons);
+#  ifdef WITH_OXYGEN_ICONS
+    Q_INIT_RESOURCE(oxygen_icons);
+#  endif
+#  ifdef WITH_BUNDLED_ICONS
+      Q_INIT_RESOURCE(breeze_icon_theme);
+      Q_INIT_RESOURCE(breeze_dark_icon_theme);
+#   ifdef WITH_OXYGEN_ICONS
+      Q_INIT_RESOURCE(oxygen_icon_theme);
 #   endif
+#  endif
 # endif
 #endif