diff options
author | Benjamin Otte <otte@redhat.com> | 2021-03-31 19:50:18 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-03-31 20:22:04 +0200 |
commit | 4f6254460d50f5c790b4e9d1b4e507bf20455444 (patch) | |
tree | 3adc7392ca890cc27e92e58b0530a13ffadab0fd | |
parent | f3e8a95849884aaf86e3313e97db332a31e94cb0 (diff) | |
download | gdk-pixbuf-otte/jpeg-fallback.tar.gz |
build: Add a libjpeg fallback wrapotte/jpeg-fallback
-rw-r--r-- | meson.build | 5 | ||||
-rw-r--r-- | subprojects/libjpeg.wrap | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 7880577dc..27b2ea84e 100644 --- a/meson.build +++ b/meson.build @@ -315,6 +315,11 @@ if get_option('jpeg') and not native_windows_loaders # so look for it as well when jpeg.lib cannot be found jpeg_dep = cc.find_library('libjpeg', required: false) endif + + if not jpeg_dep.found() + jpeg_dep = dependency('libjpeg', required: false, fallback: 'libjpeg') + endif + if jpeg_dep.found() and cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep) enabled_loaders += 'jpeg' loaders_deps += jpeg_dep diff --git a/subprojects/libjpeg.wrap b/subprojects/libjpeg.wrap new file mode 100644 index 000000000..1433fce3a --- /dev/null +++ b/subprojects/libjpeg.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = jpeg-9c +source_url = http://ijg.org/files/jpegsrc.v9c.tar.gz +source_filename = jpegsrc.v9c.tar.gz +source_hash = 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122 +patch_url = https://wrapdb.mesonbuild.com/v1/projects/libjpeg/9c/3/get_zip +patch_filename = libjpeg-9c-3-wrap.zip +patch_hash = 2d66676d254be9198d8b6b62a798d6858c7f7cea9ed0e93809d6c035351a9bba + +[provide] +libjpeg = jpeg_dep + |