summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2022-03-21 16:40:46 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2022-03-21 16:40:46 +0800
commit4d0b57afef7bf8c728c4baff1d36d78aa34868a8 (patch)
treeaa1ba60c03d48853c5fcf087a2b659e9219c640d
parent197f5b52251239b1ce424c72e2a4e4a7410c15d1 (diff)
downloadgdk-pixbuf-4d0b57afef7bf8c728c4baff1d36d78aa34868a8.tar.gz
build: Clean up libjpeg/libjpeg-turbo search
Like wat we did for libpng, do likewise to look for libjpeg (or libjpeg-turbo) via CMake's builtin support, so that we can clean up the build files and have CMake do a more comprehensive manual search for libjpeg or libjpeg-turbo.
-rw-r--r--meson.build11
1 files changed, 1 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 80b699a8f..018c2c132 100644
--- a/meson.build
+++ b/meson.build
@@ -294,16 +294,7 @@ endif
# Don't check and build the jpeg loader if native_windows_loaders is true
jpeg_opt = get_option('jpeg')
if not jpeg_opt.disabled() and not native_windows_loaders
- jpeg_dep = dependency('libjpeg', required: false)
-
- if not jpeg_dep.found() and cc.has_header('jpeglib.h')
- jpeg_dep = cc.find_library('jpeg', required: false)
- if cc.get_id() == 'msvc' and not jpeg_dep.found()
- # The IJG JPEG library builds the .lib file as libjpeg.lib in its MSVC build system,
- # so look for it as well when jpeg.lib cannot be found
- jpeg_dep = cc.find_library('libjpeg', required: false)
- endif
- endif
+ jpeg_dep = dependency(is_msvc_like ? 'jpeg' : 'libjpeg', required: false)
# Finally, look for the dependency in a fallback
if not jpeg_dep.found()