diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-02-21 17:41:00 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-02-21 17:53:31 +0800 |
commit | 83b98738b678056d420e69c2ae894f5d08219a0e (patch) | |
tree | 6c3ff3b4463e1708b35a7ea6ec6b5a1c3e4ecaab /meson.build | |
parent | a07455aa0d4205e5a6167ba0e03bf296ebcc8be3 (diff) | |
download | gtk+-83b98738b678056d420e69c2ae894f5d08219a0e.tar.gz |
meson.build: Consolidate items with MSVC-like compilers
Add a variable in meson.build that covers Visual Studio-like compilers,
so that we can use it to help us find depedencies using CMake rather
than via pkg-config, where applicable.
Change the existing use case for finding libpng accordingly.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 5add133d46..b76d1d65c5 100644 --- a/meson.build +++ b/meson.build @@ -409,12 +409,14 @@ if win32_enabled pangowin32_dep = dependency('pangowin32') endif +is_msvc_like = cc.get_argument_syntax() == 'msvc' + pangocairo_dep = dependency('pangocairo', version: pango_req, fallback : ['pango', 'libpangocairo_dep']) pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req, fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'], default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false']) -png_dep = dependency(cc.get_argument_syntax() == 'msvc' ? 'png' : 'libpng', +png_dep = dependency(is_msvc_like ? 'png' : 'libpng', fallback: ['libpng', 'libpng_dep'], required: true) tiff_dep = dependency('libtiff-4', |