summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-16 15:32:35 -0400
committerEmmanuele Bassi <ebassi@gnome.org>2021-04-16 23:33:27 +0100
commite7b6681e3f419d9cb3d2287f10a6c405fe4850aa (patch)
treec256239d8c5ef89ca94ed113221cdbfb49913e3a /meson.build
parent7583d07890ca4ec0ee4e050c24396f21ba410077 (diff)
downloadgdk-pixbuf-e7b6681e3f419d9cb3d2287f10a6c405fe4850aa.tar.gz
build: Don't do function checks for subprojects
meson can't do function checks for subprojects, since these have not been built yet at configure time. So, check if we are in that case and bypass the checks. The libjpeg we build as a subproject is new enough to have those functions, anyway.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index c07e9cb08..06c0d27dc 100644
--- a/meson.build
+++ b/meson.build
@@ -351,8 +351,13 @@ if get_option('jpeg') and not native_windows_loaders
endif
if jpeg_dep.found()
- has_destroy_decompress = cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep)
- has_simple_progression = cc.has_function('jpeg_simple_progression', dependencies: jpeg_dep)
+ if jpeg_dep.type_name() == 'internal'
+ has_destroy_decompress = true
+ has_simple_progression = true
+ else
+ has_destroy_decompress = cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep)
+ has_simple_progression = cc.has_function('jpeg_simple_progression', dependencies: jpeg_dep)
+ endif
if has_destroy_decompress and has_simple_progression
gdk_pixbuf_conf.set('HAVE_PROGRESSIVE_JPEG', has_simple_progression)