[gdk-pixbuf] build: Improve Meson's jpeg dependency discovery on MSVC
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] build: Improve Meson's jpeg dependency discovery on MSVC
- Date: Thu, 7 Sep 2017 10:10:56 +0000 (UTC)
commit 10883beb022ea275de5bac642b135b9f1ef534c2
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Aug 23 12:33:27 2017 +0800
build: Improve Meson's jpeg dependency discovery on MSVC
We may be using either libjpeg-turbo or the IJG JPEG library for our
(non-GDI+) jpeg support, so we need to also look for libjpeg.lib (the
.lib that the IJG JPEG library produces in its MSVC build system) as
well when we could not find jpeg.lib (the .lib that libjpeg-turbo
produces in its CMake build system).
https://bugzilla.gnome.org/show_bug.cgi?id=785767
meson.build | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index edd1ab9..dd42b76 100644
--- a/meson.build
+++ b/meson.build
@@ -238,6 +238,11 @@ endif
if get_option('enable_jpeg')
if 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
if jpeg_dep.found() and cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep)
enabled_loaders += 'jpeg'
loaders_deps += jpeg_dep
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]