[gdk-pixbuf/meson-cleanups: 2/3] build: Clean up libjpeg/libjpeg-turbo search
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/meson-cleanups: 2/3] build: Clean up libjpeg/libjpeg-turbo search
- Date: Mon, 21 Mar 2022 08:49:16 +0000 (UTC)
commit 4d0b57afef7bf8c728c4baff1d36d78aa34868a8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Mar 21 16:40:46 2022 +0800
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.
meson.build | 11 +----------
1 file changed, 1 insertion(+), 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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]