diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-03-07 18:05:13 +0800 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2019-07-29 18:02:05 +0000 |
commit | e2a6f6401b11f08c31662c17be26d340effe89b5 (patch) | |
tree | bc9fbcd662f2e181be0de9cfc78328d8fc89019f /meson.build | |
parent | f58d6cce2a04afaf1c62808a1f75d73e434c3706 (diff) | |
download | gdk-pixbuf-e2a6f6401b11f08c31662c17be26d340effe89b5.tar.gz |
meson.build: Don't use fallback dep for libpng unnecessarily
We could have well found the headers and .lib's needed for libpng, so
only use the fallback wrapper for libpng when we couldn't find the
headers and .lib's.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 0e17cdbcf..45d878c07 100644 --- a/meson.build +++ b/meson.build @@ -281,10 +281,12 @@ if get_option('png') # the --wrap-mode option. We don't directly call subproject() here because # that will bypass --wrap-mode and cause issues for distro packagers. # See: https://mesonbuild.com/Reference-manual.html#dependency - png_dep = dependency('', required: false, fallback: ['libpng', 'png_dep']) - if png_dep.found() - enabled_loaders += 'png' - loaders_deps += png_dep + if not png_dep.found() + png_dep = dependency('', required: false, fallback: ['libpng', 'png_dep']) + if png_dep.found() + enabled_loaders += 'png' + loaders_deps += png_dep + endif endif endif endif |