+if conf_data.get('HAVE_DJVU', 0) == 1
+ main_sources += files(
+ 'image-load-djvu.cc',
+ 'image-load-djvu.h',
+ )
+endif
+
+if conf_data.get('HAVE_EXIV2', 0) == 1
+ main_sources += files(
+ 'exiv2.cc',
+ )
+else
+ main_sources += files(
+ 'exif.cc',
+ 'exif-int.h',
+ 'format-canon.cc',
+ 'format-canon.h',
+ 'format-fuji.cc',
+ 'format-fuji.h',
+ 'format-nikon.cc',
+ 'format-nikon.h',
+ 'format-olympus.cc',
+ 'format-olympus.h',
+ 'format-raw.cc',
+ 'format-raw.h',
+ )
+endif
+
+if conf_data.get('HAVE_FFMPEGTHUMBNAILER', 0) == 1
+ main_sources += files(
+ 'image-load-ffmpegthumbnailer.cc',
+ 'image-load-ffmpegthumbnailer.h',
+ )
+endif
+
+if conf_data.get('HAVE_HEIF', 0) == 1
+ main_sources += files(
+ 'image-load-heif.cc',
+ 'image-load-heif.h',
+ )
+endif
+
+if conf_data.get('HAVE_J2K', 0) == 1
+ main_sources += files(
+ 'image-load-j2k.cc',
+ 'image-load-j2k.h',
+ )
+endif
+
+if conf_data.get('HAVE_JPEG', 0) == 1
+ main_sources += files(
+ 'image-load-jpeg.cc',
+ 'image-load-jpeg.h',
+ )
+
+ if conf_data.get('HAVE_RAW', 0) == 0
+ main_sources += files(
+ 'image-load-cr3.cc',
+ 'image-load-cr3.h',
+ )
+ endif
+endif
+
+if conf_data.get('HAVE_JPEGXL', 0) == 1
+ main_sources += files(
+ 'image-load-jpegxl.cc',
+ 'image-load-jpegxl.h',
+ )
+endif
+
+if conf_data.get('HAVE_LIBCHAMPLAIN', 0) == 1 and conf_data.get('HAVE_LIBCHAMPLAIN_GTK', 0) == 1
+ main_sources += files(
+ 'bar-gps.cc',
+ 'bar-gps.h',
+ )
+endif
+
+if conf_data.get('HAVE_LUA', 0) == 1
+ main_sources += files(
+ 'glua.h',
+ 'lua.cc',
+ )
+endif
+
+if conf_data.get('HAVE_PDF', 0) == 1
+ main_sources += files(
+ 'image-load-pdf.cc',
+ 'image-load-pdf.h',
+ )
+endif
+
+if conf_data.get('HAVE_TIFF', 0) == 1
+ main_sources += files(
+ 'image-load-tiff.cc',
+ 'image-load-tiff.h',
+ )
+endif
+
+if conf_data.get('HAVE_WEBP', 0) == 1
+ main_sources += files(
+ 'image-load-webp.cc',
+ 'image-load-webp.h',
+ )
+endif
+