libvips/libvips/meson.build
Kleis Auke Wolthuizen a6fa62605c
Cherry-pick a couple of Meson improvements to 8.13 (#2968)
* add a summary table at the end of configure

Copied from the old autotools summary. Sample clipped from "meson setup":

```
Program python3 found: YES (/usr/bin/python3)
Configuring variables.sh using configuration
Message:

*Build options
  enable debug ......................: true
  enable deprecated .................: true
  enable modules ....................: true
  enable gtk-doc ....................: true
  enable doxygen ....................: false
  enable introspection ..............: true
  enable RAD load/save ..............: true
  enable Analyze7 load/save .........: true
  enable PPM load/save ..............: true
  enable GIF load ...................: true

*Optional external packages
  use fftw for FFTs .................: true
  accelerate loops with ORC .........: true
  ICC profile support with lcms .....: true
  zlib ..............................: true
  text rendering with pangocairo ....: true
  font file support with fontcongfig : true
  EXIF metadata support with libexif : true

*External image format libraries
  JPEG load/save with libjpeg .......: true
  JXL load/save with libjxl .........: false
  JPEG2000 load/save with openjpeg ..: true
  PNG load/save with libspng ........: false
  PNG load/save with libpng .........: true
  selected quantisation package .....: imagequant
  TIFF load/save with libtiff .......: true
  image pyramid save with libgsf ....: true
  HEIC/AVIF load/save with libheif ..: true
  WebP load/save with libwebp .......: true
  PDF load with PDFium ..............: false
  PDF load with poppler-glib ........: true
  SVG load with librsvg .............: true
  EXR load/save with openexr ........: true
  OpenSlide load ....................: true
  Matlab load with libmatio .........: true
  NIfTI load/save with niftiio ......: true
  FITS load/save with cfitsio .......: true
  GIF save with cgif ................: true
  selected Magick package ...........: MagickCore
  Magick load/save ..................: true

Build targets in project: 53
...
```

* Meson: improve summary table (#2943)

* Meson: improve summary table

* Fix typo

* Remove redundant whitespace

* Fix libpng fall-back when build with `-Dspng=disabled` (#2955)

* Meson: simplify dynamic module handling (#2956)

* Deduplicate `--vips-config` with the build summary (#2957)

* Deduplicate `--vips-config` with the build summary

* Ensure output is identical

Helps parses.

* Fix summary when build with `-Dnifti=disabled` (#2963)

* Update ChangeLog

Co-authored-by: John Cupitt <jcupitt@gmail.com>
2022-07-31 10:09:00 +01:00

142 lines
3.3 KiB
Meson

libvips_sources = []
libvips_components = []
subdir('include/vips')
subdir('foreign')
if get_option('deprecated')
subdir('deprecated')
endif
subdir('arithmetic')
subdir('resample')
subdir('colour')
subdir('conversion')
subdir('convolution')
subdir('freqfilt')
subdir('histogram')
subdir('draw')
subdir('iofuncs')
subdir('morphology')
subdir('mosaicing')
subdir('create')
libvips_lib = library('vips',
enumtypes,
link_whole: libvips_components,
dependencies: libvips_deps,
version: library_version,
darwin_versions: darwin_versions,
gnu_symbol_visibility: 'hidden',
install: true,
link_args: nodelete_link_args,
)
libvips_dep = declare_dependency(
link_with: libvips_lib,
dependencies: libvips_deps,
)
pkg.generate(
libvips_lib,
requires: [ glib_dep, gio_dep, gobject_dep ],
name: 'vips',
description: 'Image processing library',
)
if get_option('introspection')
vips_gir = gnome.generate_gir(
libvips_lib,
namespace: 'Vips',
nsversion: '8.0',
identifier_prefix: 'Vips',
symbol_prefix: 'vips',
header: 'vips/vips.h',
sources: libvips_sources,
dependencies: libvips_deps,
includes: 'GObject-2.0',
install: true
)
if get_option('vapi')
gnome.generate_vapi(
'vips',
sources: vips_gir[0],
packages: [ 'glib-2.0', 'gio-2.0', 'gobject-2.0' ],
install: true
)
endif
endif
#
# The following configuration is only valid when the modules are enabled
#
if not modules_enabled
subdir_done()
endif
# Keep the autotools convention for shared module suffix because GModule
# depends on it: https://gitlab.gnome.org/GNOME/glib/issues/1413
module_suffix = []
if ['darwin', 'ios'].contains(host_os)
module_suffix = 'so'
endif
if magick_module
shared_module('vips-magick',
'module/magick.c',
magick_module_sources,
magick_module_headers,
name_prefix: '',
name_suffix: module_suffix,
dependencies: [libvips_dep, magick_dep],
install: true,
install_dir: module_dir
)
endif
if libjxl_module
shared_module('vips-jxl',
'module/jxl.c',
jpeg_xl_module_sources,
name_prefix: '',
name_suffix: module_suffix,
dependencies: [libvips_dep, libjxl_dep, libjxl_threads_dep],
install: true,
install_dir: module_dir
)
endif
if libheif_module
shared_module('vips-heif',
'module/heif.c',
heif_module_sources,
name_prefix: '',
name_suffix: module_suffix,
dependencies: [libvips_dep, libheif_dep],
install: true,
install_dir: module_dir
)
endif
if libpoppler_module
shared_module('vips-poppler',
'module/poppler.c',
poppler_module_sources,
name_prefix: '',
name_suffix: module_suffix,
dependencies: [libvips_dep, libpoppler_dep, cairo_dep],
install: true,
install_dir: module_dir
)
endif
if openslide_module
shared_module('vips-openslide',
'module/openslide.c',
openslide_module_sources,
name_prefix: '',
name_suffix: module_suffix,
dependencies: [libvips_dep, openslide_dep],
install: true,
install_dir: module_dir
)
endif