add spngsave to meson build
This commit is contained in:
parent
896cad6a7a
commit
1862e7209e
@ -43,6 +43,7 @@ foreign_sources = files(
|
||||
'rawload.c',
|
||||
'rawsave.c',
|
||||
'spngload.c',
|
||||
'spngsave.c',
|
||||
'svgload.c',
|
||||
'tiff2vips.c',
|
||||
'tiff.c',
|
||||
|
17
meson.build
17
meson.build
@ -249,18 +249,22 @@ if libjpeg_dep.found()
|
||||
endif
|
||||
|
||||
# Look for libspng first
|
||||
# 0.6.1 uses "libspng.pc", git master libspng uses "spng.pc"
|
||||
# We can simplify this when requiring meson>=0.60.0
|
||||
spng_dep = dependency('libspng', version: '>=0.6', required: false)
|
||||
# - it's sometimes called "spng.pc", sometimes "libspng.pc", we must search for
|
||||
# both
|
||||
# - we need 0.7+ for PNG write support
|
||||
# - simplify this when requiring meson>=0.60.0
|
||||
spng_dep = dependency('libspng', version: '>=0.7', required: get_option('spng'))
|
||||
if not spng_dep.found()
|
||||
spng_dep = dependency('spng', version: '>=0.6', required: get_option('spng'))
|
||||
spng_dep = dependency('spng', version: '>=0.7', required: get_option('spng'))
|
||||
endif
|
||||
if not get_option('spng').disabled() and spng_dep.found()
|
||||
libvips_deps += spng_dep
|
||||
cfg_var.set('HAVE_SPNG', '1')
|
||||
endif
|
||||
|
||||
# we can have both PNG and SPNG enabled, with SPNG for read and PNG for write
|
||||
# only if libspng not found
|
||||
png_dep = disabler()
|
||||
if not spng_dep.found()
|
||||
png_dep = dependency('libpng', version: '>=1.2.9', required: get_option('png'))
|
||||
if png_dep.found()
|
||||
libvips_deps += png_dep
|
||||
@ -269,11 +273,12 @@ if png_dep.found()
|
||||
cfg_var.set('HAVE_PNG_SET_CHUNK_MALLOC_MAX', '1')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# libwebp ... target 0.6+ to reduce complication
|
||||
# webp has the stuff for handling metadata in two separate libraries -- we
|
||||
# insit on having all of them
|
||||
# insist on having both of them
|
||||
libwebp_dep = dependency('libwebp', version: '>=0.6', required: get_option('png'))
|
||||
if libwebp_dep.found()
|
||||
libvips_deps += libwebp_dep
|
||||
|
Loading…
Reference in New Issue
Block a user