Commit 15d4838f authored by Chun-wei Fan's avatar Chun-wei Fan

meson.build: Don't use fallback dep for libpng unecessarily

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.
parent a6ee5e08
Pipeline #65988 passed with stage
in 4 minutes and 59 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment