Various improvements to the build systems (#2675)
* Meson: remove space before colon Since key-value pairs in Python are usually delimited as colon+space instead of space+colon+space. * Meson: disable modules by default when building static libraries Corresponds to autotools. See: #2323. * Meson: make modules a feature option Corresponds to autotools, where modules are built automatically if enabled and supported. * Meson: specify minimum required GLib version * Meson: fix indentation * Remove unused function checks * Simplify GLib configure checks * Meson: ensure modules doesn't include enumtypes sources Since that would cause duplicate symbols. (`soname_header` can also be safely removed here, since that is already included in `libvips_headers_dep`)
This commit is contained in:
parent
c5f2fea8bf
commit
d80185060d
20
configure.ac
20
configure.ac
@ -392,7 +392,7 @@ fi
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf _aligned_malloc posix_memalign memalign])
|
||||
AC_CHECK_FUNCS([vsnprintf _aligned_malloc posix_memalign memalign])
|
||||
AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])])
|
||||
AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])])
|
||||
AC_CHECK_LIB(m,atan2,[AC_DEFINE(HAVE_ATAN2,1,[have atan2() in libm.])])
|
||||
@ -402,16 +402,6 @@ AC_CHECK_LIB(m,asinh,[AC_DEFINE(HAVE_ASINH,1,[have asinh() in libm.])])
|
||||
PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.40 gmodule-no-export-2.0 gobject-2.0 gio-2.0)
|
||||
PACKAGES_USED="$PACKAGES_USED glib-2.0 gmodule-no-export-2.0 gobject-2.0 gio-2.0"
|
||||
|
||||
# from 2.62 we have datetime
|
||||
PKG_CHECK_MODULES(DATE_TIME_FORMAT_ISO8601, glib-2.0 >= 2.62,
|
||||
[AC_DEFINE(HAVE_DATE_TIME_FORMAT_ISO8601,1,
|
||||
[define if your glib has g_date_time_format_iso8601().]
|
||||
)
|
||||
],
|
||||
[:
|
||||
]
|
||||
)
|
||||
|
||||
VIPS_CFLAGS="$VIPS_CFLAGS $GIO_CFLAGS"
|
||||
VIPS_LIBS="$VIPS_LIBS $GIO_LIBS"
|
||||
|
||||
@ -429,14 +419,6 @@ AC_CHECK_FUNC(pthread_setattr_default_np,
|
||||
LIBS="$save_pthread_LIBS"
|
||||
CFLAGS="$save_pthread_CFLAGS"
|
||||
|
||||
# from 2.48 we have g_uint_checked_mul() etc.
|
||||
PKG_CHECK_MODULES(HAVE_CHECKED_MUL, glib-2.0 >= 2.48,
|
||||
[AC_DEFINE(HAVE_CHECKED_MUL,1,[define if your glib has checked multiply.])
|
||||
],
|
||||
[:
|
||||
]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to build dynamic modules])
|
||||
|
||||
# Disable modules by default when building static libraries
|
||||
|
@ -82,7 +82,7 @@ magick_module_headers = files(
|
||||
'magick.h',
|
||||
)
|
||||
|
||||
if magick_dep.found() and (not get_option('magick-module') or not modules_enabled)
|
||||
if not modules_enabled or get_option('magick-module').disabled()
|
||||
foreign_sources += magick_module_sources
|
||||
foreign_headers += magick_module_headers
|
||||
endif
|
||||
@ -92,7 +92,7 @@ jpeg_xl_module_sources = files(
|
||||
'jxlsave.c',
|
||||
)
|
||||
|
||||
if libjxl_dep.found() and (not get_option('jpeg-xl-module') or not modules_enabled)
|
||||
if not modules_enabled or get_option('jpeg-xl-module').disabled()
|
||||
foreign_sources += jpeg_xl_module_sources
|
||||
endif
|
||||
|
||||
@ -101,8 +101,7 @@ heif_module_sources = files(
|
||||
'heifsave.c',
|
||||
)
|
||||
|
||||
|
||||
if libheif_dep.found() and (not get_option('heif-module') or not modules_enabled)
|
||||
if not modules_enabled or get_option('heif-module').disabled()
|
||||
foreign_sources += heif_module_sources
|
||||
endif
|
||||
|
||||
@ -110,7 +109,7 @@ poppler_module_sources = files(
|
||||
'popplerload.c',
|
||||
)
|
||||
|
||||
if libpoppler_dep.found() and (not get_option('poppler-module') or not modules_enabled)
|
||||
if not modules_enabled or get_option('poppler-module').disabled()
|
||||
foreign_sources += poppler_module_sources
|
||||
endif
|
||||
|
||||
@ -118,7 +117,7 @@ openslide_module_sources = files(
|
||||
'openslideload.c',
|
||||
)
|
||||
|
||||
if openslide_dep.found() and (not get_option('openslide-module') or not modules_enabled)
|
||||
if not modules_enabled or get_option('openslide-module').disabled()
|
||||
foreign_sources += openslide_module_sources
|
||||
endif
|
||||
|
||||
|
@ -37,13 +37,13 @@ extern "C" {
|
||||
|
||||
/* Slow and horrid version if there's no recent glib.
|
||||
*/
|
||||
#ifndef HAVE_CHECKED_MUL
|
||||
#if !GLIB_CHECK_VERSION( 2, 48, 0 )
|
||||
#define g_uint_checked_mul( dest, a, b ) ( \
|
||||
((guint64) a * b) > UINT_MAX ? \
|
||||
(*dest = UINT_MAX, FALSE) : \
|
||||
(*dest = a * b, TRUE) \
|
||||
)
|
||||
#endif /*HAVE_CHECKED_MUL*/
|
||||
#endif /*!GLIB_CHECK_VERSION( 2, 48, 0 )*/
|
||||
|
||||
/* We've seen real images with 28 chunks, so set 50.
|
||||
*/
|
||||
|
@ -93,24 +93,24 @@ vips_verbose_config += 'GIF load: @0@'.format(get_option('nsgif'))
|
||||
vips_verbose_config += 'GIF save with cgif: @0@'.format(cgif_dep.found())
|
||||
vips_verbose_config += 'EXIF metadata support with libexif: @0@'.format(libexif_dep.found())
|
||||
vips_verbose_config += 'JPEG load/save with libjpeg: @0@'.format(libjpeg_dep.found())
|
||||
vips_verbose_config += 'JXL load/save with libjxl: @0@ (dynamic module: @1@)'.format(libjxl_dep.found(), get_option('jpeg-xl-module'))
|
||||
vips_verbose_config += 'JXL load/save with libjxl: @0@ (dynamic module: @1@)'.format(libjxl_dep.found(), modules_enabled and not get_option('jpeg-xl-module').disabled())
|
||||
vips_verbose_config +='JPEG2000 load/save with libopenjp2: @0@'.format(libopenjp2_dep.found())
|
||||
vips_verbose_config += 'PNG load with libspng: @0@'.format(spng_dep.found())
|
||||
vips_verbose_config += 'PNG load/save with libpng: @0@'.format(png_dep.found())
|
||||
vips_verbose_config += 'selected quantisation package: @0@'.format(quantisation_package.found() ? quantisation_package.name() : 'none')
|
||||
vips_verbose_config += 'TIFF load/save with libtiff: @0@'.format(libtiff_dep.found())
|
||||
vips_verbose_config += 'image pyramid save: @0@'.format(gsf_dep.found())
|
||||
vips_verbose_config += 'HEIC/AVIF load/save with libheif: @0@ (dynamic module: @1@)'.format(libheif_dep.found(), get_option('heif-module'))
|
||||
vips_verbose_config += 'HEIC/AVIF load/save with libheif: @0@ (dynamic module: @1@)'.format(libheif_dep.found(), modules_enabled and not get_option('heif-module').disabled())
|
||||
vips_verbose_config += 'WebP load/save with libwebp: @0@'.format(libwebp_dep.found())
|
||||
vips_verbose_config += 'PDF load with PDFium: @0@'.format(pdfium_dep.found())
|
||||
vips_verbose_config += 'PDF load with poppler-glib: @0@ (dynamic module: @1@)'.format(libpoppler_dep.found(), get_option('poppler-module'))
|
||||
vips_verbose_config += 'PDF load with poppler-glib: @0@ (dynamic module: @1@)'.format(libpoppler_dep.found(), modules_enabled and not get_option('poppler-module').disabled())
|
||||
vips_verbose_config += 'SVG load with librsvg-2.0: @0@'.format(librsvg_dep.found())
|
||||
vips_verbose_config += 'EXR load with OpenEXR: @0@'.format(openexr_dep.found())
|
||||
vips_verbose_config += 'OpenSlide load: @0@ (dynamic module: @1@)'.format(openslide_dep.found(), get_option('openslide-module'))
|
||||
vips_verbose_config += 'OpenSlide load: @0@ (dynamic module: @1@)'.format(openslide_dep.found(), modules_enabled and not get_option('openslide-module').disabled())
|
||||
vips_verbose_config += 'Matlab load with matio: @0@'.format(matio_dep.found())
|
||||
vips_verbose_config += 'NIfTI load/save with niftiio: @0@'.format(libnifti_dep.found())
|
||||
vips_verbose_config += 'FITS load/save with cfitsio: @0@'.format(cfitsio_dep.found())
|
||||
vips_verbose_config += 'Magick package: @0@ (dynamic module: @1@)'.format(magick_dep.found(), get_option('magick-module'))
|
||||
vips_verbose_config += 'Magick package: @0@ (dynamic module: @1@)'.format(magick_dep.found(), modules_enabled and not get_option('magick-module').disabled())
|
||||
if magick_dep.found()
|
||||
magick_version_str = 'magick' + magick_dep.version().split('.')[0]
|
||||
else
|
||||
|
@ -2024,7 +2024,7 @@ vips__get_iso8601( void )
|
||||
{
|
||||
char *date;
|
||||
|
||||
#ifdef HAVE_DATE_TIME_FORMAT_ISO8601
|
||||
#if GLIB_CHECK_VERSION( 2, 62, 0 )
|
||||
{
|
||||
GDateTime *now;
|
||||
|
||||
@ -2032,14 +2032,14 @@ vips__get_iso8601( void )
|
||||
date = g_date_time_format_iso8601( now );
|
||||
g_date_time_unref( now );
|
||||
}
|
||||
#else /*!HAVE_DATE_TIME_FORMAT_ISO8601*/
|
||||
#else /*!GLIB_CHECK_VERSION( 2, 62, 0 )*/
|
||||
{
|
||||
GTimeVal now;
|
||||
|
||||
g_get_current_time( &now );
|
||||
date = g_time_val_to_iso8601( &now );
|
||||
}
|
||||
#endif /*HAVE_DATE_TIME_FORMAT_ISO8601*/
|
||||
#endif /*GLIB_CHECK_VERSION( 2, 62, 0 )*/
|
||||
|
||||
return( date );
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ libvips_lib = library('vips',
|
||||
libvips_dep = declare_dependency(
|
||||
link_with: libvips_lib,
|
||||
dependencies: libvips_deps,
|
||||
sources: [ enumtypes, soname_header ]
|
||||
)
|
||||
|
||||
pkg.generate(
|
||||
@ -77,7 +76,7 @@ if ['darwin', 'ios'].contains(host_machine.system())
|
||||
module_suffix = 'so'
|
||||
endif
|
||||
|
||||
if magick_dep.found() and get_option('magick-module')
|
||||
if magick_dep.found() and not get_option('magick-module').disabled()
|
||||
shared_module('vips-magick',
|
||||
'module/magick.c',
|
||||
magick_module_sources,
|
||||
@ -90,7 +89,7 @@ if magick_dep.found() and get_option('magick-module')
|
||||
)
|
||||
endif
|
||||
|
||||
if libjxl_dep.found() and get_option('jpeg-xl-module')
|
||||
if libjxl_dep.found() and not get_option('jpeg-xl-module').disabled()
|
||||
shared_module('vips-jxl',
|
||||
'module/jxl.c',
|
||||
jpeg_xl_module_sources,
|
||||
@ -102,7 +101,7 @@ if libjxl_dep.found() and get_option('jpeg-xl-module')
|
||||
)
|
||||
endif
|
||||
|
||||
if libheif_dep.found() and get_option('heif-module')
|
||||
if libheif_dep.found() and not get_option('heif-module').disabled()
|
||||
shared_module('vips-heif',
|
||||
'module/heif.c',
|
||||
heif_module_sources,
|
||||
@ -114,7 +113,7 @@ if libheif_dep.found() and get_option('heif-module')
|
||||
)
|
||||
endif
|
||||
|
||||
if libpoppler_dep.found() and get_option('poppler-module')
|
||||
if libpoppler_dep.found() and not get_option('poppler-module').disabled()
|
||||
shared_module('vips-poppler',
|
||||
'module/poppler.c',
|
||||
poppler_module_sources,
|
||||
@ -126,7 +125,7 @@ if libpoppler_dep.found() and get_option('poppler-module')
|
||||
)
|
||||
endif
|
||||
|
||||
if openslide_dep.found() and get_option('openslide-module')
|
||||
if openslide_dep.found() and not get_option('openslide-module').disabled()
|
||||
shared_module('vips-openslide',
|
||||
'module/openslide.c',
|
||||
openslide_module_sources,
|
||||
|
42
meson.build
42
meson.build
@ -36,13 +36,13 @@ add_project_link_arguments(
|
||||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
glib_dep = dependency('glib-2.0')
|
||||
glib_dep = dependency('glib-2.0', version: '>=2.40')
|
||||
gio_dep = dependency('gio-2.0')
|
||||
gobject_dep = dependency('gobject-2.0')
|
||||
gmodule_dep = dependency('gmodule-no-export-2.0')
|
||||
gmodule_dep = dependency('gmodule-no-export-2.0', required: get_option('modules'))
|
||||
expat_dep = dependency('expat')
|
||||
thread_dep = dependency('threads')
|
||||
m_dep = cc.find_library('m', required : false)
|
||||
m_dep = cc.find_library('m', required: false)
|
||||
|
||||
libvips_deps = [
|
||||
glib_dep,
|
||||
@ -56,8 +56,9 @@ libvips_deps = [
|
||||
|
||||
prefix_dir = get_option('prefix')
|
||||
lib_dir = prefix_dir / get_option('libdir')
|
||||
if gmodule_dep.get_variable(pkgconfig: 'gmodule_supported') != 'false'
|
||||
modules_enabled = get_option('modules').enabled() or get_option('modules').auto()
|
||||
if gmodule_dep.found() and gmodule_dep.get_variable(pkgconfig: 'gmodule_supported') == 'true'
|
||||
# Disable modules by default when building static libraries
|
||||
modules_enabled = get_option('modules').enabled() or get_option('default_library') == 'shared'
|
||||
elif get_option('modules').enabled()
|
||||
error('GModule is not supported on your system, please reconfigure with -Dmodules=disabled')
|
||||
else
|
||||
@ -69,13 +70,6 @@ module_dir = lib_dir / 'vips-modules-@0@.@1@'.format(version_major, version_mino
|
||||
cfg_var = configuration_data()
|
||||
cfg_var.set_quoted('G_LOG_DOMAIN', 'VIPS')
|
||||
|
||||
if (glib_dep.version().version_compare('>=2.48'))
|
||||
cfg_var.set('HAVE_CHECKED_MUL', '1')
|
||||
endif
|
||||
if (glib_dep.version().version_compare('>=2.62'))
|
||||
cfg_var.set('HAVE_DATE_TIME_FORMAT_ISO8601', '1')
|
||||
endif
|
||||
|
||||
if modules_enabled
|
||||
cfg_var.set('ENABLE_MODULES', '1')
|
||||
endif
|
||||
@ -107,7 +101,7 @@ if cpp.compiles(vector_arithmetic_check, name: 'Has vector arithmetic', dependen
|
||||
endif
|
||||
endif
|
||||
|
||||
func_names = [ 'getcwd', 'gettimeofday', 'getwd', 'memset', 'munmap', 'putenv', 'realpath', 'strcasecmp', 'strchr', 'strcspn', 'strdup', 'strerror', 'strrchr', 'strspn', 'vsnprintf', 'realpath', 'mkstemp', 'mktemp', 'random', 'rand', 'sysconf', '_aligned_malloc', 'posix_memalign', 'memalign', 'cbrt', 'hypot', 'atan2', 'asinh' ]
|
||||
func_names = [ 'vsnprintf', '_aligned_malloc', 'posix_memalign', 'memalign', 'cbrt', 'hypot', 'atan2', 'asinh' ]
|
||||
foreach func_name : func_names
|
||||
if cc.has_function(func_name, dependencies: m_dep)
|
||||
cfg_var.set('HAVE_' + func_name.to_upper(), '1')
|
||||
@ -148,7 +142,7 @@ if not magick_dep.found()
|
||||
magick_dep = dependency('ImageMagick', required: get_option('magick'))
|
||||
endif
|
||||
if not get_option('magick').disabled() and magick_dep.found()
|
||||
if get_option('magick-module') and modules_enabled
|
||||
if modules_enabled and not get_option('magick-module').disabled()
|
||||
cfg_var.set('MAGICK_MODULE', '1')
|
||||
else
|
||||
libvips_deps += magick_dep
|
||||
@ -159,12 +153,12 @@ if not get_option('magick').disabled() and magick_dep.found()
|
||||
# come here for imagemagick6, and graphicsmagick1.x, which also uses
|
||||
# the im6 API
|
||||
cfg_var.set('HAVE_MAGICK6', '1')
|
||||
if cc.has_member('struct _ImageInfo', 'number_scenes', prefix : '#include <magick/api.h>', dependencies: magick_dep)
|
||||
if cc.has_member('struct _ImageInfo', 'number_scenes', prefix: '#include <magick/api.h>', dependencies: magick_dep)
|
||||
cfg_var.set('HAVE_NUMBER_SCENES', '1')
|
||||
endif
|
||||
func_names = [ 'InheritException', 'AcquireExceptionInfo', 'SetImageProperty', 'SetImageExtent', 'AcquireImage', 'GetVirtualPixels', 'ResetImageProfileIterator', 'ResetImageAttributeIterator', 'ResetImagePropertyIterator', 'MagickCoreGenesis', 'SetImageOption', 'BlobToStringInfo', 'OptimizePlusImageLayers', 'OptimizeImageTransparency' ]
|
||||
foreach func_name : func_names
|
||||
if cc.has_function(func_name, prefix : '#include <magick/api.h>', dependencies: magick_dep)
|
||||
if cc.has_function(func_name, prefix: '#include <magick/api.h>', dependencies: magick_dep)
|
||||
cfg_var.set('HAVE_' + func_name.to_upper(), '1')
|
||||
endif
|
||||
endforeach
|
||||
@ -185,10 +179,10 @@ if not get_option('magick').disabled() and magick_dep.found()
|
||||
endif
|
||||
if 'save' in get_option('magick-features')
|
||||
cfg_var.set('ENABLE_MAGICKSAVE', '1')
|
||||
if cc.has_function('ImportImagePixels', prefix : '#include <magick/api.h>', dependencies: magick_dep)
|
||||
if cc.has_function('ImportImagePixels', prefix: '#include <magick/api.h>', dependencies: magick_dep)
|
||||
cfg_var.set('HAVE_IMPORTIMAGEPIXELS', '1')
|
||||
endif
|
||||
if cc.has_function('ImagesToBlob', prefix : '#include <magick/api.h>', dependencies: magick_dep)
|
||||
if cc.has_function('ImagesToBlob', prefix: '#include <magick/api.h>', dependencies: magick_dep)
|
||||
cfg_var.set('HAVE_IMAGESTOBLOB', '1')
|
||||
endif
|
||||
endif
|
||||
@ -331,7 +325,7 @@ endif
|
||||
|
||||
openslide_dep = dependency('openslide', version: '>=3.3.0', required: get_option('openslide'))
|
||||
if openslide_dep.found()
|
||||
if get_option('openslide-module') and modules_enabled
|
||||
if modules_enabled and not get_option('openslide-module').disabled()
|
||||
cfg_var.set('OPENSLIDE_MODULE', '1')
|
||||
else
|
||||
libvips_deps += openslide_dep
|
||||
@ -396,7 +390,7 @@ endif
|
||||
|
||||
libheif_dep = dependency('libheif', version: '>=0.4.11', required: get_option('heif'))
|
||||
if libheif_dep.found()
|
||||
if get_option('heif-module') and modules_enabled
|
||||
if modules_enabled and not get_option('heif-module').disabled()
|
||||
cfg_var.set('HEIF_MODULE', '1')
|
||||
else
|
||||
libvips_deps += libheif_dep
|
||||
@ -423,7 +417,7 @@ endif
|
||||
libjxl_dep = dependency('libjxl', version: '>=0.5', required: get_option('jpeg-xl'))
|
||||
libjxl_threads_dep = dependency('libjxl_threads', version: '>=0.5', required: get_option('jpeg-xl'))
|
||||
if libjxl_dep.found() and libjxl_threads_dep.found()
|
||||
if get_option('jpeg-xl-module') and modules_enabled
|
||||
if modules_enabled and not get_option('jpeg-xl-module').disabled()
|
||||
cfg_var.set('LIBJXL_MODULE', '1')
|
||||
else
|
||||
libvips_deps += libjxl_dep
|
||||
@ -442,7 +436,7 @@ endif
|
||||
if libpoppler_dep.found() and cairo_dep.found() and pdfium_dep.found()
|
||||
message('PDFium has been found, ignoring Poppler support')
|
||||
elif libpoppler_dep.found() and cairo_dep.found()
|
||||
if get_option('poppler-module') and modules_enabled
|
||||
if modules_enabled and not get_option('poppler-module').disabled()
|
||||
cfg_var.set('POPPLER_MODULE', '1')
|
||||
else
|
||||
libvips_deps += libpoppler_dep
|
||||
@ -453,7 +447,7 @@ endif
|
||||
|
||||
libnifti_dep = cc.find_library('niftiio', has_headers: 'nifti1_io.h', required: false)
|
||||
if not libnifti_dep.found()
|
||||
libnifti_dep = dependency('NIFTI', method : 'cmake', modules : ['NIFTI'], required: get_option('nifti'))
|
||||
libnifti_dep = dependency('NIFTI', method: 'cmake', modules: ['NIFTI'], required: get_option('nifti'))
|
||||
endif
|
||||
if libnifti_dep.found()
|
||||
libvips_deps += libnifti_dep
|
||||
@ -504,7 +498,7 @@ cfg_var.set_quoted('VIPS_LIBDIR', lib_dir)
|
||||
if cc.has_function('ngettext')
|
||||
cfg_var.set('ENABLE_NLS', 1)
|
||||
else
|
||||
libintl_dep = cc.find_library('intl', required : false)
|
||||
libintl_dep = cc.find_library('intl', required: false)
|
||||
if libintl_dep.found()
|
||||
libvips_deps += libintl_dep
|
||||
cfg_var.set('ENABLE_NLS', 1)
|
||||
|
@ -1,47 +1,47 @@
|
||||
option('deprecated', type : 'boolean', value : true, description: 'Build deprecated components')
|
||||
option('doxygen', type : 'boolean', value : false, description: 'Build C++ documentation')
|
||||
option('gtk_doc', type : 'boolean', value : false, description: 'Build GTK-doc documentation')
|
||||
option('modules', type : 'feature', value : 'auto', description: 'Build dynamic modules')
|
||||
option('introspection', type : 'boolean', value : true, description: 'Build GObject Introspection')
|
||||
option('vapi', type : 'boolean', value : false, description: 'Build VAPI')
|
||||
option('deprecated', type: 'boolean', value: true, description: 'Build deprecated components')
|
||||
option('doxygen', type: 'boolean', value: false, description: 'Build C++ documentation')
|
||||
option('gtk_doc', type: 'boolean', value: false, description: 'Build GTK-doc documentation')
|
||||
option('modules', type: 'feature', value: 'auto', description: 'Build dynamic modules')
|
||||
option('introspection', type: 'boolean', value: true, description: 'Build GObject Introspection')
|
||||
option('vapi', type: 'boolean', value: false, description: 'Build VAPI')
|
||||
# External libraries
|
||||
option('cfitsio', type : 'feature', value : 'auto', description: 'Build with cfitsio')
|
||||
option('cgif', type : 'feature', value : 'auto', description: 'Build with cgif')
|
||||
option('exif', type : 'feature', value : 'auto', description: 'Build with libexif')
|
||||
option('fftw', type : 'feature', value : 'auto', description: 'Build with fftw3')
|
||||
option('fontconfig', type : 'feature', value : 'auto', description: 'Build with fontconfig')
|
||||
option('gsf', type : 'feature', value : 'auto', description: 'Build with libgsf-1')
|
||||
option('heif', type : 'feature', value : 'auto', description: 'Build with libheif')
|
||||
option('heif-module', type : 'boolean', value : false, description: 'Build libheif as module')
|
||||
option('imagequant', type : 'feature', value : 'auto', description: 'Build with imagequant')
|
||||
option('jpeg', type : 'feature', value : 'auto', description: 'Build with jpeg')
|
||||
option('jpeg-xl', type : 'feature', value : 'auto', description: 'Build with libjxl')
|
||||
option('jpeg-xl-module', type : 'boolean', value : false, description: 'Build libjxl as module')
|
||||
option('lcms', type : 'feature', value : 'auto', description: 'Build with lcms2')
|
||||
option('magick', type : 'feature', value : 'auto', description: 'Build with libMagic')
|
||||
option('magick-package', type : 'string', value : 'MagickCore', description: 'ImageMagick package to build with')
|
||||
option('magick-features', type : 'array', choices : ['load', 'save'], value : ['load', 'save'], description: 'Enable libMagic load or save capabilities')
|
||||
option('magick-module', type : 'boolean', value : false, description: 'Build libMagic as module')
|
||||
option('matio', type : 'feature', value : 'auto', description: 'Build with matio')
|
||||
option('nifti', type : 'feature', value : 'auto', description: 'Build with nifti')
|
||||
option('openexr', type : 'feature', value : 'auto', description: 'Build with OpenEXR')
|
||||
option('openjpeg', type : 'feature', value : 'auto', description: 'Build with libopenjp2')
|
||||
option('openslide', type : 'feature', value : 'auto', description: 'Build with OpenSlide')
|
||||
option('openslide-module', type : 'boolean', value : false, description: 'Build OpenSlide as module')
|
||||
option('orc', type : 'feature', value : 'auto', description: 'Build with orc-0.4')
|
||||
option('pangocairo', type : 'feature', value : 'auto', description: 'Build with pangocairo')
|
||||
option('pdfium', type : 'feature', value : 'auto', description: 'Build with pdfium')
|
||||
option('png', type : 'feature', value : 'auto', description: 'Build with png')
|
||||
option('poppler', type : 'feature', value : 'auto', description: 'Build with poppler')
|
||||
option('poppler-module', type : 'boolean', value : false, description: 'Build poppler as module')
|
||||
option('quantizr', type : 'feature', value : 'auto', description: 'Build with quantizr')
|
||||
option('rsvg', type : 'feature', value : 'auto', description: 'Build with rsvg')
|
||||
option('spng', type : 'feature', value : 'auto', description: 'Build with spng')
|
||||
option('tiff', type : 'feature', value : 'auto', description: 'Build with tiff')
|
||||
option('webp', type : 'feature', value : 'auto', description: 'Build with libwebp')
|
||||
option('zlib', type : 'feature', value : 'auto', description: 'Build with zlib')
|
||||
option('cfitsio', type: 'feature', value: 'auto', description: 'Build with cfitsio')
|
||||
option('cgif', type: 'feature', value: 'auto', description: 'Build with cgif')
|
||||
option('exif', type: 'feature', value: 'auto', description: 'Build with libexif')
|
||||
option('fftw', type: 'feature', value: 'auto', description: 'Build with fftw3')
|
||||
option('fontconfig', type: 'feature', value: 'auto', description: 'Build with fontconfig')
|
||||
option('gsf', type: 'feature', value: 'auto', description: 'Build with libgsf-1')
|
||||
option('heif', type: 'feature', value: 'auto', description: 'Build with libheif')
|
||||
option('heif-module', type: 'feature', value: 'auto', description: 'Build libheif as module')
|
||||
option('imagequant', type: 'feature', value: 'auto', description: 'Build with imagequant')
|
||||
option('jpeg', type: 'feature', value: 'auto', description: 'Build with jpeg')
|
||||
option('jpeg-xl', type: 'feature', value: 'auto', description: 'Build with libjxl')
|
||||
option('jpeg-xl-module', type: 'feature', value: 'auto', description: 'Build libjxl as module')
|
||||
option('lcms', type: 'feature', value: 'auto', description: 'Build with lcms2')
|
||||
option('magick', type: 'feature', value: 'auto', description: 'Build with libMagic')
|
||||
option('magick-package', type: 'string', value: 'MagickCore', description: 'ImageMagick package to build with')
|
||||
option('magick-features', type: 'array', choices: ['load', 'save'], value: ['load', 'save'], description: 'Enable libMagic load or save capabilities')
|
||||
option('magick-module', type: 'feature', value: 'auto', description: 'Build libMagic as module')
|
||||
option('matio', type: 'feature', value: 'auto', description: 'Build with matio')
|
||||
option('nifti', type: 'feature', value: 'auto', description: 'Build with nifti')
|
||||
option('openexr', type: 'feature', value: 'auto', description: 'Build with OpenEXR')
|
||||
option('openjpeg', type: 'feature', value: 'auto', description: 'Build with libopenjp2')
|
||||
option('openslide', type: 'feature', value: 'auto', description: 'Build with OpenSlide')
|
||||
option('openslide-module', type: 'feature', value: 'auto', description: 'Build OpenSlide as module')
|
||||
option('orc', type: 'feature', value: 'auto', description: 'Build with orc-0.4')
|
||||
option('pangocairo', type: 'feature', value: 'auto', description: 'Build with pangocairo')
|
||||
option('pdfium', type: 'feature', value: 'auto', description: 'Build with pdfium')
|
||||
option('png', type: 'feature', value: 'auto', description: 'Build with png')
|
||||
option('poppler', type: 'feature', value: 'auto', description: 'Build with poppler')
|
||||
option('poppler-module', type: 'feature', value: 'auto', description: 'Build poppler as module')
|
||||
option('quantizr', type: 'feature', value: 'auto', description: 'Build with quantizr')
|
||||
option('rsvg', type: 'feature', value: 'auto', description: 'Build with rsvg')
|
||||
option('spng', type: 'feature', value: 'auto', description: 'Build with spng')
|
||||
option('tiff', type: 'feature', value: 'auto', description: 'Build with tiff')
|
||||
option('webp', type: 'feature', value: 'auto', description: 'Build with libwebp')
|
||||
option('zlib', type: 'feature', value: 'auto', description: 'Build with zlib')
|
||||
# not external libraries, but have options to disable them, helps to reduce attack surface
|
||||
option('nsgif', type : 'boolean', value : true, description: 'Build with nsgif')
|
||||
option('ppm', type : 'boolean', value : true, description: 'Build with ppm')
|
||||
option('analyze', type : 'boolean', value : true, description: 'Build with analyze')
|
||||
option('radiance', type : 'boolean', value : true, description: 'Build with radiance')
|
||||
option('nsgif', type: 'boolean', value: true, description: 'Build with nsgif')
|
||||
option('ppm', type: 'boolean', value: true, description: 'Build with ppm')
|
||||
option('analyze', type: 'boolean', value: true, description: 'Build with analyze')
|
||||
option('radiance', type: 'boolean', value: true, description: 'Build with radiance')
|
||||
|
@ -6,11 +6,11 @@ tools = [
|
||||
]
|
||||
|
||||
foreach tool : tools
|
||||
executable(tool,
|
||||
tool + '.c',
|
||||
dependencies: libvips_dep,
|
||||
install: true
|
||||
)
|
||||
executable(tool,
|
||||
tool + '.c',
|
||||
dependencies: libvips_dep,
|
||||
install: true
|
||||
)
|
||||
endforeach
|
||||
|
||||
scripts = [
|
||||
@ -24,14 +24,14 @@ scripts = [
|
||||
script_data = configuration_data()
|
||||
script_data.set('prefix', get_option('prefix'))
|
||||
foreach script : scripts
|
||||
configure_file(
|
||||
input: script,
|
||||
output: '@BASENAME@',
|
||||
install: true,
|
||||
install_dir: get_option('prefix') / get_option('bindir'),
|
||||
install_mode: 'rwxr-xr-x',
|
||||
configuration: script_data
|
||||
)
|
||||
configure_file(
|
||||
input: script,
|
||||
output: '@BASENAME@',
|
||||
install: true,
|
||||
install_dir: get_option('prefix') / get_option('bindir'),
|
||||
install_mode: 'rwxr-xr-x',
|
||||
configuration: script_data
|
||||
)
|
||||
endforeach
|
||||
|
||||
install_data(
|
||||
|
Loading…
Reference in New Issue
Block a user