[gdk-pixbuf/build.fixes] meson.build: Don't use fallback dep for libpng unecessarily
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/build.fixes] meson.build: Don't use fallback dep for libpng unecessarily
- Date: Thu, 7 Mar 2019 10:09:00 +0000 (UTC)
commit 15d4838f71d10fe21fc71285587bc0ff277cc524
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Mar 7 18:05:13 2019 +0800
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.
meson.build | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6c5fa36cb..0e0799cb8 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]