Use webp-pixbuf-loader instead of image-load-webp()
[geeqie.git] / meson.build
index 2091bde..2f136d6 100644 (file)
@@ -485,19 +485,15 @@ else
     summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
 endif
 
-libwebp_dep = []
-req_version = '>=0.6.1'
-option = get_option('webp')
-if not option.disabled()
-    libwebp_dep = dependency('libwebp', version : req_version, required : get_option('webp'))
-    if libwebp_dep.found()
-        conf_data.set('HAVE_WEBP', 1)
-        summary({'webp' : ['webp files supported:', true]}, section : 'Configuration', bool_yn : true)
-    else
-        summary({'webp' : ['libwebp ' + req_version + ' not found - webp files supported:', false]}, section : 'Configuration', bool_yn : true)
-    endif
+# libpixbufloader-webp is not loaded as part of libgdk-pixbuf. Just issue
+# a warning if not installed
+libwebp_dir = dependency('gdk-pixbuf-2.0', method: 'pkg-config').get_variable('gdk_pixbuf_moduledir')
+libwebp_dep = cc.find_library('libpixbufloader-webp', dirs : libwebp_dir, required : false)
+
+if libwebp_dep.found()
+       summary({'webp' : ['webp files supported:', true]}, section : 'Configuration', bool_yn : true)
 else
-    summary({'webp' : ['disabled - webp files supported:', false]}, section : 'Configuration', bool_yn : true)
+       summary({'webp' : ['webp-pixbuf-loader not installed - webp files supported:', false]}, section : 'Configuration', bool_yn : true)
 endif
 
 # Check for nl_langinfo and _NL_TIME_FIRST_WEEKDAY