]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/imageloader.cpp
Dirty hack to pull the image loaders in when linking statically
[libs/gui.git] / source / graphics / imageloader.cpp
index 06b70d16862e890997fd274b91cb0da7ff3e273a..fbba25cd75ae59ce6e194134caea9141e79a2177 100644 (file)
@@ -2,6 +2,18 @@
 #include <msp/io/file.h>
 #include <msp/strings/format.h>
 #include "imageloader.h"
+#ifdef WITH_LIBPNG
+#include "png/pngloader.h"
+#endif
+#ifdef WITH_LIBJPEG
+#include "jpeg/jpegloader.h"
+#endif
+#ifdef WITH_DEVIL
+#include "devil/devilloader.h"
+#endif
+#ifdef WITH_QUARTZ
+#include "quartz/quartzloader.h"
+#endif
 
 using namespace std;
 
@@ -36,6 +48,19 @@ ImageLoader *ImageLoader::open_file(const string &fn)
 
 ImageLoader *ImageLoader::open_io(IO::Seekable &io)
 {
+#ifdef WITH_LIBPNG
+       (void)RegisteredImageLoader<PngLoader>::reg;
+#endif
+#ifdef WITH_LIBJPEG
+       (void)RegisteredImageLoader<JpegLoader>::reg;
+#endif
+#ifdef WITH_DEVIL
+       (void)RegisteredImageLoader<DevilLoader>::reg;
+#endif
+#ifdef WITH_QUARTZ
+       (void)RegisteredImageLoader<QuartzLoader>::reg;
+#endif
+
        list<RegisterBase *> &loaders = get_registered_loaders();
        if(registered_loaders_changed)
        {