|
Packit |
a4058c |
project('gdk-pixbuf', 'c',
|
|
Packit |
a4058c |
version: '2.36.10',
|
|
Packit |
a4058c |
license: 'LGPLv2.1+',
|
|
Packit |
a4058c |
default_options: [
|
|
Packit |
a4058c |
'buildtype=debugoptimized',
|
|
Packit |
a4058c |
'warning_level=1',
|
|
Packit |
a4058c |
'c_std=c99',
|
|
Packit |
a4058c |
],
|
|
Packit |
a4058c |
meson_version: '>= 0.40.1')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
add_project_arguments([ '-D_POSIX_C_SOURCE', '-D_DEFAULT_SOURCE' ], language: 'c')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
cc = meson.get_compiler('c')
|
|
Packit |
a4058c |
host_system = host_machine.system()
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Versioning
|
|
Packit |
a4058c |
gdk_pixbuf_version = meson.project_version()
|
|
Packit |
a4058c |
version_arr = gdk_pixbuf_version.split('.')
|
|
Packit |
a4058c |
gdk_pixbuf_version_major = version_arr[0].to_int()
|
|
Packit |
a4058c |
gdk_pixbuf_version_minor = version_arr[1].to_int()
|
|
Packit |
a4058c |
gdk_pixbuf_version_micro = version_arr[2].to_int()
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_api_version = '2.0'
|
|
Packit |
a4058c |
gdk_pixbuf_binary_version = '2.10.0'
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_api_name = '@0@-@1@'.format(meson.project_name(), gdk_pixbuf_api_version)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if gdk_pixbuf_version_minor.is_odd()
|
|
Packit |
a4058c |
gdk_pixbuf_interface_age = 0
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
gdk_pixbuf_interface_age = gdk_pixbuf_version_micro
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_binary_age = 100 * gdk_pixbuf_version_minor + gdk_pixbuf_version_micro
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# maintaining compatibility with the previous libtool versioning
|
|
Packit |
a4058c |
# current = binary - interface
|
|
Packit |
a4058c |
# revision = interface
|
|
Packit |
a4058c |
soversion = 0
|
|
Packit |
a4058c |
current = gdk_pixbuf_binary_age - gdk_pixbuf_interface_age
|
|
Packit |
a4058c |
revision = gdk_pixbuf_interface_age
|
|
Packit |
a4058c |
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
|
|
Packit |
a4058c |
age = gdk_pixbuf_binary_age - gdk_pixbuf_interface_age
|
|
Packit |
a4058c |
current_minus_age = current - age
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Paths
|
|
Packit |
a4058c |
gdk_pixbuf_prefix = get_option('prefix')
|
|
Packit |
a4058c |
gdk_pixbuf_libdir = join_paths(gdk_pixbuf_prefix, get_option('libdir'))
|
|
Packit |
a4058c |
gdk_pixbuf_bindir = join_paths(gdk_pixbuf_prefix, get_option('bindir'))
|
|
Packit |
a4058c |
gdk_pixbuf_includedir = join_paths(gdk_pixbuf_prefix, get_option('includedir'))
|
|
Packit |
a4058c |
gdk_pixbuf_datadir = join_paths(gdk_pixbuf_prefix, get_option('datadir'))
|
|
Packit |
a4058c |
gdk_pixbuf_mandir = join_paths(gdk_pixbuf_prefix, get_option('mandir'))
|
|
Packit |
a4058c |
gdk_pixbuf_localedir = join_paths(gdk_pixbuf_prefix, get_option('localedir'))
|
|
Packit |
a4058c |
gdk_pixbuf_libexecdir = join_paths(gdk_pixbuf_prefix, get_option('libexecdir'))
|
|
Packit |
a4058c |
gdk_pixbuf_loaderdir = join_paths(gdk_pixbuf_libdir, 'gdk-pixbuf-@0@/@1@/loaders'.format(gdk_pixbuf_api_version, gdk_pixbuf_binary_version))
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Dependencies
|
|
Packit |
a4058c |
glib_req_version = '>= 2.38.0'
|
|
Packit |
a4058c |
gio_dep = dependency('gio-2.0', version: glib_req_version)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Configurations
|
|
Packit |
a4058c |
gdk_pixbuf_conf = configuration_data()
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
check_headers = [
|
|
Packit |
a4058c |
'unistd.h',
|
|
Packit |
a4058c |
'sys/resource.h',
|
|
Packit |
a4058c |
'sys/time.h'
|
|
Packit |
a4058c |
]
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
foreach h: check_headers
|
|
Packit |
a4058c |
if cc.has_header(h)
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('HAVE_' + h.underscorify().to_upper(), 1)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endforeach
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Look for the math library first, since we use it to test for round() and lrint()
|
|
Packit |
a4058c |
mathlib_dep = cc.find_library('m', required: false)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# XXX: Remove the checks for round() and lrint() once GDK-Pixbuf is declared C99
|
|
Packit |
a4058c |
if cc.has_function('round', dependencies: mathlib_dep)
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('HAVE_ROUND', 1)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if cc.has_function('lrint', dependencies: mathlib_dep)
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('HAVE_LRINT', 1)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# We use links() because sigsetjmp() is often a macro hidden behind other macros
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('HAVE_SIGSETJMP',
|
|
Packit |
a4058c |
cc.links('''#define _POSIX_SOURCE
|
|
Packit |
a4058c |
#include <setjmp.h>
|
|
Packit |
a4058c |
int main (void) {
|
|
Packit |
a4058c |
sigjmp_buf env;
|
|
Packit |
a4058c |
sigsetjmp (env, 0);
|
|
Packit |
a4058c |
return 0;
|
|
Packit |
a4058c |
}''', name: 'sigsetjmp'))
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Common compiler and linker flags
|
|
Packit |
a4058c |
common_cflags = []
|
|
Packit |
a4058c |
common_ldflags = []
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc'
|
|
Packit |
a4058c |
# For Visual Studio, just force-include msvc_reommended_pragmas.h
|
|
Packit |
a4058c |
# so that we silence unwanted noise and track potential issues
|
|
Packit |
a4058c |
test_cflags = []
|
|
Packit |
a4058c |
add_project_arguments([ '-FImsvc_recommended_pragmas.h' ], language: 'c')
|
|
Packit |
a4058c |
elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|
Packit |
a4058c |
test_cflags = [
|
|
Packit |
a4058c |
'-Wpointer-arith',
|
|
Packit |
a4058c |
'-Wformat=2',
|
|
Packit |
a4058c |
'-Wstrict-prototypes',
|
|
Packit |
a4058c |
'-Wnested-externs',
|
|
Packit |
a4058c |
'-Wold-style-definition',
|
|
Packit |
a4058c |
'-Wdeclaration-after-statement',
|
|
Packit |
a4058c |
'-Wunused',
|
|
Packit |
a4058c |
'-Wcast-align',
|
|
Packit |
a4058c |
'-Wmissing-noreturn',
|
|
Packit |
a4058c |
'-Wmissing-format-attribute',
|
|
Packit |
a4058c |
'-Wlogical-op',
|
|
Packit |
a4058c |
'-fno-strict-aliasing',
|
|
Packit |
a4058c |
'-Wno-int-conversion',
|
|
Packit |
a4058c |
'-Wno-uninitialized',
|
|
Packit |
a4058c |
'-Wno-discarded-qualifiers',
|
|
Packit |
a4058c |
'-Werror=implicit',
|
|
Packit |
a4058c |
'-Werror=nonnull',
|
|
Packit |
a4058c |
'-Werror=init-self',
|
|
Packit |
a4058c |
'-Werror=main',
|
|
Packit |
a4058c |
'-Werror=missing-braces',
|
|
Packit |
a4058c |
'-Werror=sequence-point',
|
|
Packit |
a4058c |
'-Werror=return-type',
|
|
Packit |
a4058c |
'-Werror=trigraphs',
|
|
Packit |
a4058c |
'-Werror=array-bounds',
|
|
Packit |
a4058c |
'-Werror=write-strings',
|
|
Packit |
a4058c |
'-Werror=address',
|
|
Packit |
a4058c |
'-Werror=int-to-pointer-cast',
|
|
Packit |
a4058c |
'-Werror=pointer-to-int-cast',
|
|
Packit |
a4058c |
'-Werror=empty-body',
|
|
Packit |
a4058c |
]
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Ensure we have the correct bit packing on Windows
|
|
Packit |
a4058c |
if host_system == 'windows'
|
|
Packit |
a4058c |
test_cflags += '-mms-bitfields'
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
test_cflags = []
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Symbol visibility
|
|
Packit |
a4058c |
if get_option('default_library') != 'static'
|
|
Packit |
a4058c |
if host_system == 'windows'
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('DLL_EXPORT', true)
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('_GDK_PIXBUF_EXTERN', '__declspec(dllexport) extern')
|
|
Packit |
a4058c |
if cc.get_id() != 'msvc'
|
|
Packit |
a4058c |
test_cflags += ['-fvisibility=hidden']
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('_GDK_PIXBUF_EXTERN', '__attribute__((visibility("default"))) extern')
|
|
Packit |
a4058c |
test_cflags += ['-fvisibility=hidden']
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
foreach cflag: test_cflags
|
|
Packit |
a4058c |
if cc.has_argument(cflag)
|
|
Packit |
a4058c |
common_cflags += cflag
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endforeach
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Linker flags
|
|
Packit |
a4058c |
if host_machine.system() == 'linux'
|
|
Packit |
a4058c |
ldflag_prog = 'int main (void) { return 0; }'
|
|
Packit |
a4058c |
foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
|
|
Packit |
a4058c |
if cc.links(ldflag_prog, args: ldflag, name: 'using @0@'.format(ldflag))
|
|
Packit |
a4058c |
common_ldflags += ldflag
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endforeach
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Maintain compatibility with autotools on macOS
|
|
Packit |
a4058c |
if host_machine.system() == 'darwin'
|
|
Packit |
a4058c |
common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Dependencies
|
|
Packit |
a4058c |
gobject_dep = dependency('gobject-2.0', version: glib_req_version)
|
|
Packit |
a4058c |
gmodule_dep = dependency('gmodule-no-export-2.0')
|
|
Packit |
a4058c |
gio_dep = dependency('gio-2.0')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# On non-Windows/macOS systems we always required shared-mime-info and GIO
|
|
Packit |
a4058c |
if host_system != 'windows' and host_system != 'darwin'
|
|
Packit |
a4058c |
shared_mime_dep = dependency('shared-mime-info')
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
shared_mime_dep = []
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep ]
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Check if we can build shared modules
|
|
Packit |
a4058c |
build_modules = gmodule_dep.get_pkgconfig_variable('gmodule_supported') == 'true'
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set10('USE_GMODULE', build_modules)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Check which loaders should be built into gdk-pixbuf
|
|
Packit |
a4058c |
builtin_loaders = get_option('builtin_loaders').split(',')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# If 'all' is specified for builtin_loaders, build all
|
|
Packit |
a4058c |
# buildable loaders into gdk-pixbuf
|
|
Packit |
a4058c |
builtin_all_loaders = false
|
|
Packit |
a4058c |
if builtin_loaders == [ 'all' ]
|
|
Packit |
a4058c |
builtin_all_loaders = true
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Loader dependencies
|
|
Packit |
a4058c |
enabled_loaders = []
|
|
Packit |
a4058c |
loaders_deps = []
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if get_option('enable_png')
|
|
Packit |
a4058c |
# We have a vast selection of libpng versions to choose from
|
|
Packit |
a4058c |
foreach png: [ 'libpng16', 'libpng15', 'libpng14', 'libpng13', 'libpng12', 'libpng10' ]
|
|
Packit |
a4058c |
if not enabled_loaders.contains('png')
|
|
Packit |
a4058c |
png_dep = dependency(png, required: false)
|
|
Packit |
a4058c |
if png_dep.found()
|
|
Packit |
a4058c |
enabled_loaders += 'png'
|
|
Packit |
a4058c |
loaders_deps += png_dep
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endforeach
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if not enabled_loaders.contains('png')
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc' and cc.has_header('png.h')
|
|
Packit |
a4058c |
# MSVC: First look for the DLL + import .lib build of libpng,
|
|
Packit |
a4058c |
# which is normally libpngxx.lib, when libpng's pkg-config can't
|
|
Packit |
a4058c |
# be found, which is quite normal on MSVC.
|
|
Packit |
a4058c |
foreach png: [ 'libpng16', 'libpng15', 'libpng14', 'libpng12', 'libpng13', 'libpng10' ]
|
|
Packit |
a4058c |
if not enabled_loaders.contains('png')
|
|
Packit |
a4058c |
png_dep = cc.find_library(png, required: false)
|
|
Packit |
a4058c |
if png_dep.found()
|
|
Packit |
a4058c |
enabled_loaders += 'png'
|
|
Packit |
a4058c |
loaders_deps += png_dep
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endforeach
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# If we still can't find libpng, try looking for the static libpng.lib,
|
|
Packit |
a4058c |
# which means we need to ensure we have the static zlib .lib as well
|
|
Packit |
a4058c |
if not enabled_loaders.contains('png')
|
|
Packit |
a4058c |
png_dep = cc.find_library('libpng', required: false)
|
|
Packit |
a4058c |
zlib_dep = cc.find_library('zlib', required: false)
|
|
Packit |
a4058c |
if png_dep.found() and zlib_dep.found()
|
|
Packit |
a4058c |
enabled_loaders += 'png'
|
|
Packit |
a4058c |
loaders_deps += [ png_dep, zlib_dep ]
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# On Windows, check whether we are building the native Windows loaders
|
|
Packit |
a4058c |
# (it is an "all-or-nothing" option for BMP, EMF, GIF, ICO, JPEG, TIFF and WMF)
|
|
Packit |
a4058c |
# Note that we currently do not use the native Windows loaders to handle PNG and
|
|
Packit |
a4058c |
# JPEG2000 images
|
|
Packit |
a4058c |
if host_system == 'windows'
|
|
Packit |
a4058c |
enable_native_windows_loaders = get_option('enable_native_windows_loaders')
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
enable_native_windows_loaders = false
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if enable_native_windows_loaders
|
|
Packit |
a4058c |
loaders_deps += cc.find_library('gdiplus')
|
|
Packit |
a4058c |
loaders_deps += cc.find_library('ole32')
|
|
Packit |
a4058c |
enabled_loaders += 'gdiplus'
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Don't check and build the jpeg loader if enable_native_windows_loaders is true
|
|
Packit |
a4058c |
if get_option('enable_jpeg') and not enable_native_windows_loaders
|
|
Packit |
a4058c |
if cc.has_header('jpeglib.h')
|
|
Packit |
a4058c |
jpeg_dep = cc.find_library('jpeg', required: false)
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc' and not jpeg_dep.found()
|
|
Packit |
a4058c |
# The IJG JPEG library builds the .lib file as libjpeg.lib in its MSVC build system,
|
|
Packit |
a4058c |
# so look for it as well when jpeg.lib cannot be found
|
|
Packit |
a4058c |
jpeg_dep = cc.find_library('libjpeg', required: false)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
if jpeg_dep.found() and cc.has_function('jpeg_destroy_decompress', dependencies: jpeg_dep)
|
|
Packit |
a4058c |
enabled_loaders += 'jpeg'
|
|
Packit |
a4058c |
loaders_deps += jpeg_dep
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set('HAVE_PROGRESSIVE_JPEG',
|
|
Packit |
a4058c |
cc.has_function('jpeg_simple_progression', dependencies: jpeg_dep))
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Don't check and build the tiff loader if enable_native_windows_loaders is true
|
|
Packit |
a4058c |
if get_option('enable_tiff') and not enable_native_windows_loaders
|
|
Packit |
a4058c |
tiff_dep = dependency('libtiff-4', required: false)
|
|
Packit |
a4058c |
if not tiff_dep.found()
|
|
Packit |
a4058c |
# Fallback when no pkg-config file is found for libtiff on MSVC, which is quite normal
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc' and cc.has_header('tiff.h')
|
|
Packit |
a4058c |
# First look for the DLL builds of libtiff, then the static builds
|
|
Packit |
a4058c |
tiff_dep = cc.find_library('libtiff_i', required: false)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if not tiff_dep.found()
|
|
Packit |
a4058c |
# For the static lib, zlib and libjpeg .lib's have been looked for first, and
|
|
Packit |
a4058c |
# they are optional for libtiff
|
|
Packit |
a4058c |
tiff_dep = cc.find_library('libtiff', required: false)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
if tiff_dep.found()
|
|
Packit |
a4058c |
enabled_loaders += 'tiff'
|
|
Packit |
a4058c |
loaders_deps += tiff_dep
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
jasper_extra_cflags = []
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if get_option('enable_jasper')
|
|
Packit |
a4058c |
has_jasper_header = false
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc'
|
|
Packit |
a4058c |
# We must define JAS_WIN_MSVC_BUILD before including jasper/jasper.h on MSVC
|
|
Packit |
a4058c |
jasper_msvc_macro = 'JAS_WIN_MSVC_BUILD'
|
|
Packit |
a4058c |
has_jasper_header = cc.has_header('jasper/jasper.h', prefix: '#define @0@'.format(jasper_msvc_macro))
|
|
Packit |
a4058c |
jasper_extra_cflags = [ '-D@0@'.format(jasper_msvc_macro) ]
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
has_jasper_header = cc.has_header('jasper/jasper.h')
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if has_jasper_header
|
|
Packit |
a4058c |
jasper_dep = cc.find_library('jasper', required: false)
|
|
Packit |
a4058c |
if not jasper_dep.found()
|
|
Packit |
a4058c |
if cc.get_id() == 'msvc'
|
|
Packit |
a4058c |
# on MSVC, we need to look for libjasper.lib if jasper.lib is not found,
|
|
Packit |
a4058c |
# which corresponds to what libjasper's MSVC projects produce
|
|
Packit |
a4058c |
jasper_dep = cc.find_library('libjasper', required: false)
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
if jasper_dep.found() and cc.has_function('jas_init', dependencies: jasper_dep)
|
|
Packit |
a4058c |
enabled_loaders += 'jasper'
|
|
Packit |
a4058c |
loaders_deps += jasper_dep
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Determine whether we enable application bundle relocation support, and we use
|
|
Packit |
a4058c |
# this always on Windows
|
|
Packit |
a4058c |
if host_system == 'windows'
|
|
Packit |
a4058c |
relocatable = true
|
|
Packit |
a4058c |
else
|
|
Packit |
a4058c |
relocatable = get_option('enable_relocatable')
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
if relocatable
|
|
Packit |
a4058c |
add_project_arguments([ '-DGDK_PIXBUF_RELOCATABLE' ], language: 'c')
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gdk_pixbuf_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
configure_file(output: 'config.h', configuration: gdk_pixbuf_conf)
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Compat variables for pkgconfig
|
|
Packit |
a4058c |
pkgconf = configuration_data()
|
|
Packit |
a4058c |
pkgconf.set('prefix', gdk_pixbuf_prefix)
|
|
Packit |
a4058c |
pkgconf.set('exec_prefix', gdk_pixbuf_prefix)
|
|
Packit |
a4058c |
pkgconf.set('libdir', gdk_pixbuf_libdir)
|
|
Packit |
a4058c |
pkgconf.set('includedir', gdk_pixbuf_includedir)
|
|
Packit |
a4058c |
pkgconf.set('GDK_PIXBUF_API_VERSION', gdk_pixbuf_api_version)
|
|
Packit |
a4058c |
pkgconf.set('GDK_PIXBUF_BINARY_VERSION', gdk_pixbuf_binary_version)
|
|
Packit |
a4058c |
pkgconf.set('GDK_PIXBUF_EXTRA_CFLAGS', '')
|
|
Packit |
a4058c |
pkgconf.set('GDK_PIXBUF_EXTRA_LIBS', '')
|
|
Packit |
a4058c |
pkgconf.set('PNG_DEP_CFLAGS_PACKAGES', '')
|
|
Packit |
a4058c |
pkgconf.set('VERSION', meson.project_version())
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
configure_file(input: 'gdk-pixbuf-2.0.pc.in',
|
|
Packit |
a4058c |
output: 'gdk-pixbuf-2.0.pc',
|
|
Packit |
a4058c |
configuration: pkgconf,
|
|
Packit |
a4058c |
install: true,
|
|
Packit |
a4058c |
install_dir: join_paths(gdk_pixbuf_libdir, 'pkgconfig'))
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
root_inc = include_directories('.')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Auxiliary scripts
|
|
Packit |
a4058c |
gen_resources = find_program('build-aux/gen-resources.py')
|
|
Packit |
a4058c |
gen_installed_test = find_program('build-aux/gen-installed-test.py')
|
|
Packit |
a4058c |
gen_thumbnailer = find_program('build-aux/gen-thumbnailer.py')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
gnome = import('gnome')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
subdir('gdk-pixbuf')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# X11
|
|
Packit |
a4058c |
x11_dep = dependency('x11', required: false)
|
|
Packit |
a4058c |
if x11_dep.found()
|
|
Packit |
a4058c |
subdir('contrib/gdk-pixbuf-xlib')
|
|
Packit |
a4058c |
endif
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# i18n
|
|
Packit |
a4058c |
subdir('po')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
subdir('tests')
|
|
Packit |
a4058c |
subdir('thumbnailer')
|
|
Packit |
a4058c |
|
|
Packit |
a4058c |
# Documentation
|
|
Packit |
a4058c |
subdir('docs/reference/gdk-pixbuf')
|