summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-12-18 06:54:44 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-12-18 21:42:03 +0530
commitcc6b0c5750e3cbb1a8b85f626332033934c91956 (patch)
tree479d486705a54643cfa6786eb31e4f621791febf /meson.build
parent235f01952ce205ed152c7a70758fb6e8f0eba77e (diff)
downloadgtk+-cc6b0c5750e3cbb1a8b85f626332033934c91956.tar.gz
meson: Always look for both cmake and pkgconfig names
The is_msvc_like change is wrong; it used a false correlation between "compiler being used" and "dependency method" by saying that on Windows, when building with MSVC, you will only use CMake to find png, jpeg, tiff. You can use pkgconfig to find these deps on Windows with MSVC -- when the deps have been built with Autotools or Meson (with MSVC). You can also find these deps using CMake on other platforms like macOS or Linux. The solution is simple: just search for both names on all platforms, and just search for the pkgconfig name first.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 6 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index cabe74c30d..a485363358 100644
--- a/meson.build
+++ b/meson.build
@@ -410,22 +410,17 @@ 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(is_msvc_like ? 'png' : 'libpng',
- fallback: ['libpng', 'libpng_dep'],
- required: true)
-tiff_dep = dependency(is_msvc_like ? 'tiff' : 'libtiff-4',
- fallback: ['libtiff', 'libtiff4_dep'],
- required: true)
-jpeg_dep = dependency(is_msvc_like ? 'jpeg' : 'libjpeg',
- fallback: ['libjpeg-turbo', 'jpeg_dep'],
- required: true)
+png_dep = dependency('libpng', 'png',
+ fallback: ['libpng', 'libpng_dep'])
+tiff_dep = dependency('libtiff-4', 'tiff',
+ fallback: ['libtiff', 'libtiff4_dep'])
+jpeg_dep = dependency('libjpeg', 'jpeg',
+ fallback: ['libjpeg-turbo', 'jpeg_dep'])
epoxy_dep = dependency('epoxy', version: epoxy_req,
fallback: ['libepoxy', 'libepoxy_dep'])