2017-10-18 21:11:07 +00:00
|
|
|
project('gtk+', 'c',
|
2017-10-20 06:05:46 +00:00
|
|
|
version: '3.93.0',
|
2016-08-15 08:03:57 +00:00
|
|
|
default_options: [
|
|
|
|
'buildtype=debugoptimized',
|
2017-04-18 13:29:48 +00:00
|
|
|
'warning_level=1',
|
2017-09-07 18:23:41 +00:00
|
|
|
# We only need c99, but glib needs GNU-specific features
|
|
|
|
# https://github.com/mesonbuild/meson/issues/2289
|
|
|
|
'c_std=gnu99',
|
2016-08-15 08:03:57 +00:00
|
|
|
],
|
2018-02-11 16:42:09 +00:00
|
|
|
meson_version : '>= 0.43.0',
|
2016-08-15 08:03:57 +00:00
|
|
|
license: 'LGPLv2.1+')
|
|
|
|
|
2017-04-18 13:24:06 +00:00
|
|
|
glib_major_req = 2
|
2018-02-13 17:00:27 +00:00
|
|
|
glib_minor_req = 55
|
|
|
|
glib_micro_req = 0
|
2017-04-18 13:24:06 +00:00
|
|
|
|
|
|
|
if glib_minor_req.is_odd()
|
|
|
|
glib_min_required = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req - 1)
|
|
|
|
else
|
|
|
|
glib_min_required = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if glib_minor_req.is_odd()
|
|
|
|
glib_max_allowed = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req + 1)
|
|
|
|
else
|
|
|
|
glib_max_allowed = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req)
|
|
|
|
endif
|
|
|
|
|
2017-08-10 20:30:36 +00:00
|
|
|
glib_req = '>= @0@.@1@.@2@'.format(glib_major_req, glib_minor_req, glib_micro_req)
|
2018-01-03 18:06:28 +00:00
|
|
|
pango_req = '>= 1.41.0'
|
2017-08-10 20:30:36 +00:00
|
|
|
atk_req = '>= 2.15.1'
|
|
|
|
cairo_req = '>= 1.14.0'
|
|
|
|
gdk_pixbuf_req = '>= 2.30.0'
|
|
|
|
introspection_req = '>= 1.39.0'
|
2017-09-05 08:07:54 +00:00
|
|
|
wayland_proto_req = '>= 1.9'
|
2017-08-10 20:30:36 +00:00
|
|
|
wayland_req = '>= 1.9.91'
|
|
|
|
graphene_req = '>= 1.5.1'
|
2017-02-16 00:03:05 +00:00
|
|
|
epoxy_req = '>= 1.4'
|
2017-10-30 20:38:41 +00:00
|
|
|
cloudproviders_req = '>= 0.2.5'
|
2017-08-10 20:30:36 +00:00
|
|
|
xkbcommon_req = '>= 0.2.0'
|
2017-03-22 00:15:31 +00:00
|
|
|
|
2016-08-21 14:00:37 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
|
2017-03-12 16:28:11 +00:00
|
|
|
add_project_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
|
2017-03-23 15:09:51 +00:00
|
|
|
add_project_arguments('-DGLIB_MIN_REQUIRED_VERSION=' + glib_min_required, language: 'c')
|
|
|
|
add_project_arguments('-DGLIB_MAX_ALLOWED_VERSION=' + glib_max_allowed, language: 'c')
|
2016-08-21 14:00:37 +00:00
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
# Making releases:
|
|
|
|
# 1. gtk_micro_version += 1;
|
|
|
|
# 2. gtk_interface_age += 1;
|
|
|
|
# 3. if any functions have been added, set gtk_interface_age to 0.
|
|
|
|
# 4. if backwards compatibility has been broken, we're in trouble
|
|
|
|
gtk_version = meson.project_version()
|
|
|
|
gtk_major_version = gtk_version.split('.')[0].to_int()
|
|
|
|
gtk_minor_version = gtk_version.split('.')[1].to_int()
|
|
|
|
gtk_micro_version = gtk_version.split('.')[2].to_int()
|
2016-08-23 06:21:54 +00:00
|
|
|
gtk_interface_age = 0
|
2017-04-26 16:04:20 +00:00
|
|
|
add_project_arguments('-DGTK_VERSION="@0@"'.format(meson.project_version()), language: 'c')
|
2016-09-24 06:15:28 +00:00
|
|
|
|
2017-05-10 11:03:01 +00:00
|
|
|
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
|
|
|
|
|
|
|
gtk_debug_cflags = []
|
|
|
|
buildtype = get_option('buildtype')
|
|
|
|
if buildtype == 'debugoptimized' or buildtype == 'debug'
|
|
|
|
gtk_debug_cflags += '-DG_ENABLE_DEBUG'
|
|
|
|
if buildtype == 'debug'
|
|
|
|
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
|
|
|
|
else
|
|
|
|
gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS'
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
gtk_debug_cflags += [ '-DG_DISABLE_ASSERT', '-DG_DISABLE_CAST_CHECKS', '-DG_DISABLE_CHECKS', ]
|
|
|
|
endif
|
|
|
|
|
|
|
|
add_project_arguments(gtk_debug_cflags, language: 'c')
|
2017-03-11 22:06:07 +00:00
|
|
|
|
2016-09-24 06:15:28 +00:00
|
|
|
# Define a string for the earliest version that this release has
|
|
|
|
# backwards binary compatibility with for all interfaces a module
|
|
|
|
# might. Unless we add module-only API with lower stability
|
|
|
|
# guarantees, this should be unchanged until we break binary compat
|
|
|
|
# for GTK+.
|
2017-03-22 00:15:31 +00:00
|
|
|
gtk_binary_version = '4.0.0'
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2016-09-24 15:35:10 +00:00
|
|
|
gtk_binary_age = 100 * gtk_minor_version + gtk_micro_version
|
2017-03-22 00:15:31 +00:00
|
|
|
|
2017-04-18 13:51:25 +00:00
|
|
|
gtk_soversion = '0.@0@.@1@'.format(gtk_binary_age - gtk_interface_age, gtk_interface_age)
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
gtk_api_version = '4.0'
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2018-02-14 14:04:04 +00:00
|
|
|
x11_enabled = get_option('x11-backend')
|
|
|
|
wayland_enabled = get_option('wayland-backend')
|
|
|
|
broadway_enabled = get_option('broadway-backend')
|
|
|
|
quartz_enabled = get_option('quartz-backend')
|
|
|
|
win32_enabled = get_option('win32-backend')
|
2016-08-21 15:16:03 +00:00
|
|
|
|
2016-09-20 14:29:14 +00:00
|
|
|
os_unix = false
|
|
|
|
os_linux = false
|
|
|
|
os_win32 = false
|
|
|
|
os_darwin = false
|
|
|
|
|
2018-02-14 14:04:04 +00:00
|
|
|
# Some windowing system backends depend on the platform we're
|
|
|
|
# building for, so we need to ensure they are disabled; in other
|
|
|
|
# cases, they are the only windowing system available, so we need
|
|
|
|
# to ensure they are enabled
|
|
|
|
if host_machine.system() == 'darwin'
|
2016-09-20 14:29:14 +00:00
|
|
|
os_darwin = true
|
2018-02-14 14:04:04 +00:00
|
|
|
win32_enabled = false
|
2017-08-01 08:49:08 +00:00
|
|
|
elif host_machine.system() == 'windows'
|
2016-09-20 14:29:14 +00:00
|
|
|
os_win32 = true
|
2017-08-01 08:49:08 +00:00
|
|
|
win32_enabled = true
|
|
|
|
x11_enabled = false
|
|
|
|
wayland_enabled = false
|
2018-02-14 14:04:04 +00:00
|
|
|
quartz_enabled = false
|
|
|
|
elif host_machine.system() == 'linux'
|
2016-09-20 14:29:14 +00:00
|
|
|
os_linux = true
|
2018-02-14 14:04:04 +00:00
|
|
|
win32_enabled = false
|
|
|
|
quartz_enabled = false
|
2016-09-20 14:29:14 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
os_unix = not os_win32
|
|
|
|
|
2017-04-18 13:21:05 +00:00
|
|
|
gtk_prefix = get_option('prefix')
|
2017-04-26 14:59:43 +00:00
|
|
|
gtk_includedir = join_paths(gtk_prefix, get_option('includedir'))
|
2017-04-18 13:21:05 +00:00
|
|
|
gtk_libdir = join_paths(gtk_prefix, get_option('libdir'))
|
|
|
|
gtk_datadir = join_paths(gtk_prefix, get_option('datadir'))
|
|
|
|
gtk_localedir = join_paths(gtk_prefix, get_option('localedir'))
|
2017-04-18 13:22:23 +00:00
|
|
|
gtk_sysconfdir = join_paths(gtk_prefix, get_option('sysconfdir'))
|
2017-04-26 14:59:43 +00:00
|
|
|
gtk_applicationsdir = join_paths(gtk_datadir, 'applications')
|
|
|
|
gtk_schemasdir = join_paths(gtk_datadir, 'glib-2.0/schemas')
|
2016-08-22 19:26:38 +00:00
|
|
|
|
2016-08-15 08:03:57 +00:00
|
|
|
cc = meson.get_compiler('c')
|
2017-04-18 13:21:05 +00:00
|
|
|
|
2016-08-15 08:03:57 +00:00
|
|
|
cdata = configuration_data()
|
2017-04-18 13:21:05 +00:00
|
|
|
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
|
|
cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir)
|
|
|
|
cdata.set_quoted('GTK_DATADIR', gtk_datadir)
|
|
|
|
cdata.set_quoted('GTK_LIBDIR', gtk_libdir)
|
2017-04-18 13:22:23 +00:00
|
|
|
cdata.set_quoted('GTK_SYSCONFDIR', gtk_sysconfdir)
|
2017-04-18 13:21:05 +00:00
|
|
|
cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40')
|
2016-09-10 04:58:16 +00:00
|
|
|
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
|
2016-08-23 06:21:54 +00:00
|
|
|
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
|
|
|
|
cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
|
|
|
|
cdata.set('GTK_BINARY_AGE', gtk_binary_age)
|
|
|
|
cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
|
2017-03-23 19:15:44 +00:00
|
|
|
|
2016-08-15 08:03:57 +00:00
|
|
|
check_headers = [
|
2017-03-23 19:15:44 +00:00
|
|
|
'crt/externs.h',
|
|
|
|
'dlfcn.h',
|
|
|
|
'ftw.h',
|
|
|
|
'inttypes.h',
|
|
|
|
'linux/memfd.h',
|
|
|
|
'locale.h',
|
|
|
|
'memory.h',
|
|
|
|
'stdint.h',
|
|
|
|
'stdlib.h',
|
|
|
|
'strings.h',
|
|
|
|
'string.h',
|
|
|
|
'sys/mman.h',
|
|
|
|
'sys/param.h',
|
|
|
|
'sys/stat.h',
|
|
|
|
'sys/sysinfo.h',
|
|
|
|
'sys/systeminfo.h',
|
|
|
|
'sys/time.h',
|
|
|
|
'sys/types.h',
|
|
|
|
'unistd.h',
|
2016-08-15 08:03:57 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach h : check_headers
|
2017-03-23 19:15:44 +00:00
|
|
|
if cc.has_header(h)
|
|
|
|
cdata.set('HAVE_' + h.underscorify().to_upper(), 1)
|
2016-08-15 08:03:57 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2017-03-11 22:30:35 +00:00
|
|
|
# Maths functions might be implemented in libm
|
2017-04-18 13:25:44 +00:00
|
|
|
libm = cc.find_library('m', required: false)
|
2017-03-11 22:30:35 +00:00
|
|
|
|
2017-03-23 19:36:59 +00:00
|
|
|
check_functions = [
|
|
|
|
'dcgettext',
|
|
|
|
'getpagesize',
|
|
|
|
'getresuid',
|
|
|
|
'lstat',
|
|
|
|
'mmap',
|
|
|
|
'nearbyint',
|
|
|
|
'posix_fallocate',
|
|
|
|
'_lock_file',
|
|
|
|
'flockfile',
|
|
|
|
'mkstemp',
|
|
|
|
'mallinfo',
|
|
|
|
'round',
|
|
|
|
'rint',
|
|
|
|
'log2',
|
|
|
|
'exp2',
|
|
|
|
'sincos',
|
2016-08-15 08:03:57 +00:00
|
|
|
]
|
|
|
|
|
2017-03-23 19:36:59 +00:00
|
|
|
foreach func : check_functions
|
2017-04-18 13:25:44 +00:00
|
|
|
if cc.has_function(func, dependencies: libm)
|
2017-03-23 19:36:59 +00:00
|
|
|
cdata.set('HAVE_' + func.underscorify().to_upper(), 1)
|
2016-08-15 08:03:57 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2017-03-23 19:36:59 +00:00
|
|
|
cdata.set('HAVE_DECL_ISINF', cc.has_header_symbol('math.h', 'isinf'))
|
|
|
|
cdata.set('HAVE_DECL_ISNAN', cc.has_header_symbol('math.h', 'isnan'))
|
|
|
|
|
2016-09-24 15:35:10 +00:00
|
|
|
# Disable deprecation checks for all libraries we depend on on stable branches.
|
|
|
|
# This is so newer versions of those libraries don't cause more warnings with
|
|
|
|
# a stable GTK version.
|
|
|
|
# We don't ever want to turn off deprecation warnings for master however, because
|
|
|
|
# that's where we get rid of deprecated API we use.
|
2017-04-18 13:28:11 +00:00
|
|
|
if gtk_minor_version.is_even()
|
2016-09-24 15:35:10 +00:00
|
|
|
cdata.set('GLIB_DISABLE_DEPRECATION_WARNINGS', 1)
|
|
|
|
endif
|
|
|
|
|
2017-04-18 13:28:11 +00:00
|
|
|
# Compiler flags
|
|
|
|
if cc.get_id() == 'msvc'
|
|
|
|
# Compiler options taken from msvc_recommended_pragmas.h
|
|
|
|
# in GLib, based on _Win32_Programming_ by Rector and Newcomer
|
2017-08-01 08:49:08 +00:00
|
|
|
test_cflags = []
|
|
|
|
add_project_arguments('-FImsvc_recommended_pragmas.h', language: 'c')
|
|
|
|
add_project_arguments('-D_USE_MATH_DEFINES', language: 'c')
|
2017-04-18 13:28:11 +00:00
|
|
|
elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|
|
|
test_cflags = [
|
|
|
|
'-fno-strict-aliasing',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
'-Wimplicit-function-declaration',
|
|
|
|
'-Wformat=2',
|
|
|
|
'-Wformat-nonliteral',
|
|
|
|
'-Wformat-security',
|
|
|
|
'-Wstrict-prototypes',
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
'-Wnested-externs',
|
|
|
|
'-Wold-style-definition',
|
|
|
|
'-Wundef',
|
|
|
|
'-Wunused',
|
|
|
|
'-Wcast-align',
|
|
|
|
'-Wmissing-noreturn',
|
|
|
|
'-Wmissing-format-attribute',
|
|
|
|
'-Wmissing-include-dirs',
|
|
|
|
'-Wlogical-op',
|
2017-10-06 19:19:42 +00:00
|
|
|
'-Wswitch-default',
|
|
|
|
'-Wswitch-enum',
|
2017-10-23 14:28:38 +00:00
|
|
|
'-Wignored-qualifiers',
|
2017-04-18 13:28:11 +00:00
|
|
|
'-Werror=redundant-decls',
|
|
|
|
'-Werror=implicit',
|
|
|
|
'-Werror=nonnull',
|
|
|
|
'-Werror=init-self',
|
|
|
|
'-Werror=main',
|
|
|
|
'-Werror=missing-braces',
|
|
|
|
'-Werror=sequence-point',
|
|
|
|
'-Werror=return-type',
|
|
|
|
'-Werror=trigraphs',
|
|
|
|
'-Werror=array-bounds',
|
|
|
|
'-Werror=write-strings',
|
|
|
|
'-Werror=address',
|
|
|
|
'-Werror=int-to-pointer-cast',
|
|
|
|
'-Werror=pointer-to-int-cast',
|
|
|
|
'-Werror=empty-body',
|
|
|
|
'-Werror=write-strings',
|
|
|
|
]
|
|
|
|
else
|
|
|
|
test_cflags = []
|
|
|
|
endif
|
|
|
|
|
|
|
|
common_cflags = []
|
|
|
|
foreach cflag: test_cflags
|
|
|
|
if cc.has_argument(cflag)
|
|
|
|
common_cflags += [ cflag ]
|
|
|
|
endif
|
|
|
|
endforeach
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-04-18 13:28:46 +00:00
|
|
|
# Symbol visibility
|
|
|
|
if get_option('default_library') != 'static'
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
cdata.set('DLL_EXPORT', true)
|
2017-08-22 09:27:14 +00:00
|
|
|
cdata.set('_GDK_EXTERN', '__declspec(dllexport) extern')
|
|
|
|
if cc.get_id() != 'msvc'
|
2017-04-18 13:28:46 +00:00
|
|
|
common_cflags += ['-fvisibility=hidden']
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
cdata.set('_GDK_EXTERN', '__attribute__((visibility("default"))) extern')
|
|
|
|
common_cflags += ['-fvisibility=hidden']
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-04-18 13:51:25 +00:00
|
|
|
common_ldflags = []
|
|
|
|
|
|
|
|
if host_machine.system() == 'linux'
|
|
|
|
foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
|
|
|
|
if cc.has_argument(ldflag)
|
|
|
|
common_ldflags += [ ldflag ]
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Maintain compatibility with autotools
|
|
|
|
if host_machine.system() == 'darwin'
|
2017-08-22 09:24:45 +00:00
|
|
|
common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
|
2017-04-18 13:51:25 +00:00
|
|
|
endif
|
|
|
|
|
2016-08-15 08:03:57 +00:00
|
|
|
confinc = include_directories('.')
|
|
|
|
gdkinc = include_directories('gdk')
|
2017-04-19 10:35:45 +00:00
|
|
|
gskinc = include_directories('gsk')
|
2016-08-23 06:21:54 +00:00
|
|
|
gtkinc = include_directories('gtk')
|
2017-04-19 10:35:45 +00:00
|
|
|
testinc = include_directories('tests')
|
2016-08-23 06:21:54 +00:00
|
|
|
|
2017-04-26 15:51:46 +00:00
|
|
|
# Dependencies
|
2017-09-07 18:23:41 +00:00
|
|
|
glib_dep = dependency('glib-2.0', version: glib_req,
|
|
|
|
fallback : ['glib', 'libglib_dep'])
|
|
|
|
gobject_dep = dependency('gobject-2.0', version: glib_req,
|
|
|
|
fallback : ['glib', 'libgobject_dep'])
|
2017-08-01 08:49:08 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled,
|
|
|
|
fallback : ['glib', 'libgio_dep'])
|
|
|
|
else
|
|
|
|
giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false,
|
2017-09-07 18:23:41 +00:00
|
|
|
fallback : ['glib', 'libgio_dep'])
|
2017-08-01 08:49:08 +00:00
|
|
|
endif
|
2017-09-07 18:23:41 +00:00
|
|
|
gmodule_dep = dependency('gmodule-2.0', version: glib_req,
|
|
|
|
fallback : ['glib', 'libgmodule_dep'])
|
2017-09-12 05:34:36 +00:00
|
|
|
cairo_dep = dependency('cairo', version: cairo_req, required : cc.get_id() != 'msvc')
|
|
|
|
cairogobj_dep = dependency('cairo-gobject', version: cairo_req, required : cc.get_id() != 'msvc')
|
2017-09-07 18:23:41 +00:00
|
|
|
pango_dep = dependency('pango', version: pango_req,
|
|
|
|
fallback : ['pango', 'libpango_dep'])
|
2017-08-01 08:49:08 +00:00
|
|
|
|
|
|
|
if wayland_enabled or x11_enabled
|
|
|
|
pangoft_dep = dependency('pangoft2', fallback : ['pango', 'libpangoft2_dep'])
|
|
|
|
else
|
|
|
|
pangoft_dep = dependency('pangoft2', required: false)
|
|
|
|
endif
|
|
|
|
|
|
|
|
pangocairo_dep = dependency('pangocairo', version: cairo_req,
|
2017-09-07 18:23:41 +00:00
|
|
|
fallback : ['pango', 'libpangocairo_dep'])
|
|
|
|
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
|
|
|
|
fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'])
|
2017-08-22 09:20:45 +00:00
|
|
|
epoxy_dep = dependency('epoxy', version: epoxy_req,
|
|
|
|
fallback: ['libepoxy', 'libepoxy_dep'])
|
2017-03-22 00:15:31 +00:00
|
|
|
atk_dep = dependency('atk', version: atk_req)
|
2016-09-20 14:29:14 +00:00
|
|
|
harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
|
2017-08-01 08:49:08 +00:00
|
|
|
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
|
2017-04-18 13:26:12 +00:00
|
|
|
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
|
2017-08-22 09:20:45 +00:00
|
|
|
fallback: ['graphene', 'graphene_dep'])
|
2018-01-06 19:39:22 +00:00
|
|
|
iso_codes_dep = dependency('iso-codes', required: false)
|
2017-03-22 18:25:09 +00:00
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
fontconfig_dep = [] # only used in x11 backend
|
|
|
|
atkbridge_dep = [] # only used in x11 backend
|
|
|
|
|
2017-08-01 08:49:08 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
platform_gio_dep = giowin32_dep
|
|
|
|
else
|
|
|
|
platform_gio_dep = giounix_dep
|
|
|
|
endif
|
|
|
|
|
2018-01-03 04:46:37 +00:00
|
|
|
cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
|
|
|
|
cdata.set('HAVE_PANGOFT', pangoft_dep.found())
|
|
|
|
|
2018-01-06 19:39:22 +00:00
|
|
|
if iso_codes_dep.found()
|
|
|
|
cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_pkgconfig_variable('prefix'))
|
|
|
|
else
|
|
|
|
cdata.set_quoted('ISO_CODES_PREFIX', '/usr')
|
|
|
|
endif
|
|
|
|
|
2017-03-23 15:54:58 +00:00
|
|
|
backend_immodules = []
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
pc_gdk_extra_libs = []
|
|
|
|
|
|
|
|
cairo_backends = []
|
2017-04-26 16:04:20 +00:00
|
|
|
foreach backend: [ ['cairo-xlib', cairo_req, x11_enabled],
|
|
|
|
['cairo-win32', cairo_req, win32_enabled],
|
|
|
|
['cairo-quartz', cairo_req, quartz_enabled],
|
2018-02-05 06:46:01 +00:00
|
|
|
['cairo', cairo_req, broadway_enabled or wayland_enabled], ]
|
2017-04-26 16:04:20 +00:00
|
|
|
backend_enabled = backend.get(2)
|
|
|
|
cairo_backend_req = backend.get(1)
|
|
|
|
cairo_backend = backend.get(0)
|
|
|
|
if backend_enabled
|
2017-09-12 05:34:36 +00:00
|
|
|
if dependency(cairo_backend, version: cairo_backend_req, required : cc.get_id() != 'msvc').found()
|
|
|
|
cairo_backends += [ cairo_backend ]
|
|
|
|
endif
|
2017-03-22 00:15:31 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2017-09-12 05:34:36 +00:00
|
|
|
cairo_pkg_found = false
|
|
|
|
cairogobj_pkg_found = false
|
|
|
|
|
|
|
|
if cairo_dep.found()
|
|
|
|
cairo_pkg_found = true
|
|
|
|
endif
|
|
|
|
if cairogobj_dep.found()
|
|
|
|
cairogobj_pkg_found = true
|
|
|
|
endif
|
|
|
|
|
2017-09-15 14:57:34 +00:00
|
|
|
cairo_libs = []
|
2017-09-12 05:34:36 +00:00
|
|
|
if cc.get_id() == 'msvc'
|
|
|
|
# Fallback depedency discovery for those on Visual Studio that do not generate
|
|
|
|
# pkg-config files in their build systems for MSVC
|
|
|
|
# Fallback for Cairo
|
|
|
|
if not cairo_dep.found()
|
|
|
|
if (cc.has_header('cairo.h') and cc.has_header('cairo-win32.h'))
|
|
|
|
cairo_dep = cc.find_library('cairo')
|
|
|
|
if cairo_dep.found()
|
|
|
|
cairo_libs += '-lcairo'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Fallback for Cairo-GObject
|
|
|
|
if not cairogobj_dep.found()
|
|
|
|
if cc.has_header('cairo-gobject.h')
|
|
|
|
cairogobj_dep = cc.find_library('cairo-gobject')
|
|
|
|
if cairogobj_dep.found()
|
|
|
|
cairo_libs += '-lcairo-gobject'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Fallback for HarfBuzz
|
|
|
|
if not harfbuzz_dep.found()
|
|
|
|
if cc.has_header('harfbuzz/hb.h')
|
|
|
|
harfbuzz_dep = cc.find_library('harfbuzz', required : false)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
atk_pkgs = ['atk']
|
2016-08-15 08:03:57 +00:00
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
wayland_pkgs = []
|
2016-09-24 15:35:10 +00:00
|
|
|
if wayland_enabled
|
2017-03-22 00:15:31 +00:00
|
|
|
wlclientdep = dependency('wayland-client', version: wayland_req)
|
|
|
|
wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req)
|
|
|
|
wlcursordep = dependency('wayland-cursor', version: wayland_req)
|
2016-09-24 15:35:10 +00:00
|
|
|
wlegldep = dependency('wayland-egl')
|
2017-11-30 17:53:26 +00:00
|
|
|
backend_immodules += ['wayland']
|
2017-03-22 00:15:31 +00:00
|
|
|
|
|
|
|
wayland_pkgs = [
|
|
|
|
'wayland-client', wayland_req,
|
|
|
|
'wayland-protocols', wayland_proto_req,
|
2017-04-26 15:51:46 +00:00
|
|
|
'xkbcommon', xkbcommon_req,
|
2017-03-22 00:15:31 +00:00
|
|
|
'wayland-cursor', wayland_req,
|
|
|
|
'wayland-egl',
|
|
|
|
]
|
2016-08-15 08:03:57 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
x11_pkgs = []
|
2016-09-24 15:35:10 +00:00
|
|
|
if x11_enabled
|
|
|
|
xrandr_dep = dependency('xrandr', version: '>= 1.2.99')
|
|
|
|
xrandr15_dep = dependency('xrandr', version: '>= 1.5', required: false)
|
|
|
|
x11_dep = dependency('x11')
|
|
|
|
xrender_dep = dependency('xrender')
|
|
|
|
xi_dep = dependency('xi')
|
|
|
|
xext_dep = dependency('xext')
|
|
|
|
xcursor_dep = dependency('xcursor', required: false)
|
|
|
|
xdamage_dep = dependency('xdamage', required: false)
|
|
|
|
xfixes_dep = dependency('xfixes', required: false)
|
|
|
|
xcomposite_dep = dependency('xcomposite', required: false)
|
2017-03-22 00:15:31 +00:00
|
|
|
fontconfig_dep = dependency('fontconfig')
|
|
|
|
atkbridge_dep = dependency('atk-bridge-2.0', version: atk_req)
|
2016-09-24 15:35:10 +00:00
|
|
|
|
2017-03-23 15:54:58 +00:00
|
|
|
backend_immodules += ['xim']
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr']
|
2016-09-24 10:46:10 +00:00
|
|
|
|
2016-09-24 15:35:10 +00:00
|
|
|
if xcursor_dep.found()
|
2017-03-22 00:15:31 +00:00
|
|
|
x11_pkgs += ['xcursor']
|
|
|
|
endif
|
|
|
|
if xfixes_dep.found()
|
|
|
|
x11_pkgs += ['xfixes']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
|
|
|
if xcomposite_dep.found()
|
2017-03-22 00:15:31 +00:00
|
|
|
x11_pkgs += ['xcomposite']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
2017-03-22 00:15:31 +00:00
|
|
|
if xdamage_dep.found()
|
|
|
|
x11_pkgs += ['xdamage']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
2016-09-24 10:46:10 +00:00
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
atk_pkgs += ['atk-bridge-2.0']
|
|
|
|
|
|
|
|
cdata.set('HAVE_XDAMAGE', xdamage_dep.found())
|
|
|
|
cdata.set('HAVE_XCURSOR', xcursor_dep.found())
|
|
|
|
cdata.set('HAVE_XCOMPOSITE', xcomposite_dep.found())
|
|
|
|
cdata.set('HAVE_XFIXES', xfixes_dep.found())
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
if cc.has_function('XkbQueryExtension', dependencies: x11_dep,
|
2017-03-11 22:30:35 +00:00
|
|
|
prefix : '#include <X11/XKBlib.h>')
|
|
|
|
cdata.set('HAVE_XKB', 1)
|
|
|
|
endif
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
if cc.has_function('XSyncQueryExtension', dependencies: xext_dep,
|
|
|
|
prefix: '''#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/sync.h>''')
|
2017-03-11 22:30:35 +00:00
|
|
|
cdata.set('HAVE_XSYNC', 1)
|
|
|
|
endif
|
2016-09-24 10:46:10 +00:00
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
if cc.has_function('XGetEventData', dependencies: x11_dep)
|
2017-03-11 22:30:35 +00:00
|
|
|
cdata.set('HAVE_XGENERICEVENTS', 1)
|
|
|
|
endif
|
2016-09-24 10:46:10 +00:00
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
if xi_dep.found() and cc.has_header('X11/extensions/XInput2.h', dependencies: xi_dep)
|
2016-09-24 15:35:10 +00:00
|
|
|
cdata.set('XINPUT_2', 1)
|
2017-03-24 11:03:56 +00:00
|
|
|
# Note that we also check that the XIScrollClassInfo struct is defined,
|
|
|
|
# because at least Ubuntu Oneiric seems to have XIAllowTouchEvents(),
|
|
|
|
# but not the XIScrollClassInfo struct
|
2017-04-26 16:04:20 +00:00
|
|
|
has_allow_touch_evens = cc.has_function('XIAllowTouchEvents', dependencies: xi_dep)
|
|
|
|
has_scroll_class_info = cc.has_member('XIScrollClassInfo', 'number', dependencies: xi_dep,
|
|
|
|
prefix: '''#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/XInput2.h>''')
|
|
|
|
if has_allow_touch_evens and has_scroll_class_info
|
2016-09-24 15:35:10 +00:00
|
|
|
cdata.set('XINPUT_2_2', 1)
|
|
|
|
endif
|
2016-09-24 10:46:10 +00:00
|
|
|
endif
|
|
|
|
|
2018-02-14 14:07:22 +00:00
|
|
|
enable_xinerama = get_option('xinerama')
|
2017-03-24 11:34:49 +00:00
|
|
|
if enable_xinerama != 'no'
|
|
|
|
want_xinerama = enable_xinerama == 'yes'
|
2017-04-26 16:04:20 +00:00
|
|
|
xinerama_dep = dependency('xinerama', required: want_xinerama)
|
|
|
|
if xinerama_dep.found() and cc.has_header_symbol('X11/extensions/Xinerama.h', 'XineramaQueryExtension', dependencies: xinerama_dep)
|
2017-03-24 11:34:49 +00:00
|
|
|
cdata.set('HAVE_XFREE_XINERAMA', 1)
|
|
|
|
x11_pkgs += ['xinerama']
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
xinerama_dep = []
|
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
cdata.set('HAVE_RANDR', xrandr_dep.found())
|
|
|
|
cdata.set('HAVE_RANDR15', xrandr15_dep.found())
|
2016-09-24 10:46:10 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
if broadway_enabled
|
|
|
|
pc_gdk_extra_libs += ['-lz']
|
2017-03-23 15:54:58 +00:00
|
|
|
backend_immodules += ['broadway']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
if quartz_enabled
|
|
|
|
pc_gdk_extra_libs += ['-framework Cocoa', '-framework Carbon']
|
2017-03-23 15:54:58 +00:00
|
|
|
backend_immodules += ['quartz']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
if win32_enabled
|
2017-08-01 08:49:08 +00:00
|
|
|
pc_gdk_extra_libs += ['-lgdi32', '-limm32', '-lshell32', '-lole32']
|
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
pc_gdk_extra_libs += ['-Wl,-luuid']
|
|
|
|
endif
|
|
|
|
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
|
2017-03-23 15:54:58 +00:00
|
|
|
backend_immodules += ['ime']
|
2016-09-24 15:35:10 +00:00
|
|
|
endif
|
2016-09-24 10:46:10 +00:00
|
|
|
|
2017-09-07 18:23:41 +00:00
|
|
|
# Check for bind_textdomain_codeset, including -lintl if GLib brings it in by
|
|
|
|
# doing the same check as glib. We can't check that by linking to glib because
|
|
|
|
# it might be a subproject and hence not built yet.
|
|
|
|
libintl_dep = cc.find_library('intl', required : false)
|
|
|
|
if cc.has_function('bind_textdomain_codeset', dependencies: libintl_dep)
|
2017-03-23 20:50:03 +00:00
|
|
|
cdata.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
|
|
|
|
endif
|
|
|
|
|
2017-08-01 08:49:08 +00:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
cdata.set('HAVE_GIO_UNIX', giounix_dep.found())
|
|
|
|
endif
|
2017-03-22 00:15:31 +00:00
|
|
|
|
2017-03-17 23:43:36 +00:00
|
|
|
# Check for Vulkan support
|
|
|
|
# TODO: move to gsk subfolder maybe? Or will it be used elsewhere too?
|
|
|
|
have_vulkan = false
|
2018-02-05 11:42:02 +00:00
|
|
|
vulkan_pkg_found = false
|
|
|
|
vulkan_dep = []
|
2017-08-11 09:05:55 +00:00
|
|
|
|
2018-02-14 14:07:22 +00:00
|
|
|
enable_vulkan = get_option('vulkan')
|
2018-02-05 11:42:02 +00:00
|
|
|
if enable_vulkan == 'no'
|
|
|
|
message('Vulkan support explicitly disabled')
|
|
|
|
else
|
|
|
|
vulkan_dep = dependency('vulkan', required: false)
|
|
|
|
if vulkan_dep.found()
|
2017-03-23 12:29:08 +00:00
|
|
|
have_vulkan = true
|
2018-02-05 11:42:02 +00:00
|
|
|
vulkan_pkg_found = true
|
|
|
|
else
|
|
|
|
if cc.get_id() == 'msvc'
|
|
|
|
vulkan_libname = 'vulkan-1'
|
|
|
|
else
|
|
|
|
vulkan_libname = 'vulkan'
|
|
|
|
endif
|
|
|
|
vulkan_dep = cc.find_library(vulkan_libname, required: false)
|
2018-02-05 14:35:34 +00:00
|
|
|
if vulkan_dep.found() and cc.has_function('vkCreateInstance', dependencies: vulkan_dep) and cc.has_header('vulkan/vulkan.h')
|
2018-02-05 11:42:02 +00:00
|
|
|
have_vulkan = true
|
|
|
|
pc_gdk_extra_libs += ['-l@0@'.format(vulkan_libname)]
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
if enable_vulkan == 'yes' and not have_vulkan
|
2017-03-24 11:34:49 +00:00
|
|
|
error('Vulkan support not found, but was explicitly requested.')
|
2017-03-17 23:43:36 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-02-14 14:07:22 +00:00
|
|
|
cloudproviders_enabled = get_option('cloudproviders')
|
2017-08-10 20:30:36 +00:00
|
|
|
if cloudproviders_enabled
|
|
|
|
cloudproviders_dep = dependency('cloudproviders', required: true)
|
|
|
|
if cloudproviders_dep.found()
|
|
|
|
cdata.set('HAVE_CLOUDPROVIDERS', cloudproviders_dep.found())
|
|
|
|
else
|
|
|
|
error('Cloudproviders support not found, but was explicitly requested.')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-03-23 15:54:58 +00:00
|
|
|
subdir('modules/input')
|
2016-08-15 08:03:57 +00:00
|
|
|
subdir('gdk')
|
2016-11-03 08:47:00 +00:00
|
|
|
subdir('gsk')
|
2016-09-20 09:10:27 +00:00
|
|
|
subdir('gtk')
|
2017-03-22 16:48:56 +00:00
|
|
|
subdir('modules')
|
2017-09-06 19:45:00 +00:00
|
|
|
if get_option('build-tests')
|
2017-09-06 12:33:18 +00:00
|
|
|
subdir('tests')
|
|
|
|
subdir('testsuite')
|
|
|
|
endif
|
|
|
|
if get_option('demos')
|
|
|
|
subdir('demos')
|
|
|
|
subdir('examples')
|
|
|
|
endif
|
2017-03-22 00:15:31 +00:00
|
|
|
|
2017-03-22 16:48:56 +00:00
|
|
|
# config.h
|
2017-04-18 13:25:44 +00:00
|
|
|
configure_file(input: 'config.h.meson',
|
|
|
|
output: 'config.h',
|
|
|
|
configuration: cdata)
|
2017-03-22 16:48:56 +00:00
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
# pkg-config files - bit of a mess all of this
|
|
|
|
pkgconf = configuration_data()
|
|
|
|
|
|
|
|
pkgconf.set('prefix', get_option('prefix'))
|
|
|
|
pkgconf.set('exec_prefix', '${prefix}')
|
|
|
|
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
|
|
|
|
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
|
|
|
|
pkgconf.set('GTK_API_VERSION', gtk_api_version)
|
|
|
|
pkgconf.set('VERSION', meson.project_version())
|
|
|
|
pkgconf.set('GTK_BINARY_VERSION', gtk_binary_version)
|
2017-04-18 13:28:11 +00:00
|
|
|
pkgconf.set('host', '@0@-@1@'.format(host_machine.cpu_family(), host_machine.system())) # FIXME
|
2017-03-22 00:15:31 +00:00
|
|
|
|
|
|
|
# Requires
|
|
|
|
pango_pkgname = win32_enabled ? 'pangowin32' : 'pango'
|
2017-09-12 05:34:36 +00:00
|
|
|
gdk_packages = ' '.join([ pango_pkgname, pango_req,
|
2017-04-26 16:04:20 +00:00
|
|
|
'pangocairo', pango_req,
|
2017-09-12 05:34:36 +00:00
|
|
|
'gdk-pixbuf-2.0', gdk_pixbuf_req ])
|
|
|
|
|
|
|
|
if cairo_pkg_found
|
|
|
|
gdk_packages += ' '.join([ ' cairo', cairo_req ])
|
|
|
|
endif
|
|
|
|
if cairogobj_pkg_found
|
|
|
|
gdk_packages += ' '.join([ ' cairo-gobject', cairo_req ])
|
|
|
|
endif
|
|
|
|
|
2018-02-05 11:42:02 +00:00
|
|
|
if vulkan_pkg_found
|
|
|
|
gdk_packages += 'vulkan'
|
|
|
|
endif
|
|
|
|
|
2017-09-12 05:34:36 +00:00
|
|
|
pkgconf.set('GDK_PACKAGES', gdk_packages)
|
2017-04-26 16:04:20 +00:00
|
|
|
pkgconf.set('GSK_PACKAGES',
|
|
|
|
' '.join([ 'graphene-gobject-1.0', graphene_req ]))
|
|
|
|
pkgconf.set('GTK_PACKAGES',
|
|
|
|
' '.join([ 'atk', atk_req,
|
|
|
|
'gio-2.0', glib_req ]))
|
2017-03-22 00:15:31 +00:00
|
|
|
|
|
|
|
# Requires.private
|
2017-09-12 05:34:36 +00:00
|
|
|
pc_gdk_extra_libs += cairo_libs
|
|
|
|
|
2017-03-22 00:15:31 +00:00
|
|
|
gio_pkgname = os_unix ? 'gio-unix-2.0' : 'gio-2.0'
|
2017-04-26 16:04:20 +00:00
|
|
|
pkgconf.set('GDK_PRIVATE_PACKAGES',
|
|
|
|
' '.join([ gio_pkgname, glib_req,
|
2018-02-05 06:46:01 +00:00
|
|
|
'epoxy', epoxy_req ] + x11_pkgs + wayland_pkgs + cairo_backends))
|
2017-03-22 00:15:31 +00:00
|
|
|
pkgconf.set('GSK_PRIVATE_PACKAGES', '') # all already in GDK_PRIVATE_PACKAGES
|
|
|
|
pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : []
|
|
|
|
pkgconf.set('GTK_PRIVATE_PACKAGES', ' '.join(atk_pkgs + pangoft2_pkgs))
|
|
|
|
|
|
|
|
pkgconf.set('GDK_EXTRA_LIBS', ' '.join(pc_gdk_extra_libs))
|
|
|
|
pkgconf.set('GSK_EXTRA_LIBS', '')
|
|
|
|
pkgconf.set('GTK_EXTRA_LIBS', '')
|
|
|
|
|
|
|
|
pkgconf.set('GDK_EXTRA_CFLAGS', '')
|
|
|
|
pkgconf.set('GSK_EXTRA_CFLAGS', '')
|
|
|
|
pkgconf.set('GTK_EXTRA_CFLAGS', '')
|
|
|
|
|
|
|
|
pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
pkgs = [ 'gtk+-4.0.pc' ]
|
2017-03-22 00:15:31 +00:00
|
|
|
|
|
|
|
pkg_targets = ''
|
2018-02-05 06:46:01 +00:00
|
|
|
foreach backend: [ 'broadway', 'quartz', 'wayland', 'win32', 'x11', ]
|
2017-03-22 00:15:31 +00:00
|
|
|
if get_variable('@0@_enabled'.format(backend))
|
|
|
|
pkgs += ['gtk+-@0@-4.0.pc'.format(backend)]
|
|
|
|
pkg_targets += ' ' + backend
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
pkgconf.set('GDK_BACKENDS', pkg_targets.strip())
|
|
|
|
|
2017-04-26 16:04:20 +00:00
|
|
|
foreach pkg: pkgs
|
|
|
|
configure_file(input: 'gtk+-4.0.pc.in',
|
|
|
|
output: pkg,
|
|
|
|
configuration: pkgconf,
|
|
|
|
install_dir: pkg_install_dir)
|
2017-03-22 00:15:31 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
if host_machine.system() != 'windows'
|
2017-04-26 16:04:20 +00:00
|
|
|
configure_file(input: 'gtk+-unix-print-4.0.pc.in',
|
|
|
|
output: 'gtk+-unix-print-4.0.pc',
|
|
|
|
configuration: pkgconf,
|
|
|
|
install_dir: pkg_install_dir)
|
2017-03-22 00:15:31 +00:00
|
|
|
endif
|
2017-03-22 13:53:25 +00:00
|
|
|
|
|
|
|
subdir('po')
|
|
|
|
subdir('po-properties')
|
2017-04-19 10:35:45 +00:00
|
|
|
|
2017-09-06 13:43:24 +00:00
|
|
|
if get_option('documentation')
|
2017-04-19 10:35:45 +00:00
|
|
|
subdir('docs/tools')
|
|
|
|
subdir('docs/reference')
|
|
|
|
endif
|
2017-04-26 14:59:43 +00:00
|
|
|
|
2017-08-18 15:56:09 +00:00
|
|
|
summary = [
|
|
|
|
'',
|
|
|
|
'------',
|
|
|
|
'GTK+ @0@ (@1@)'.format(gtk_version, gtk_api_version),
|
|
|
|
'',
|
|
|
|
' Enabled backends: @0@'.format(pkg_targets.strip()),
|
2017-09-14 14:04:50 +00:00
|
|
|
' Vulkan support: @0@'.format(have_vulkan),
|
2018-02-14 13:55:32 +00:00
|
|
|
' Print backends: @0@'.format(' '.join(print_backends)),
|
2017-09-14 14:04:50 +00:00
|
|
|
' Tests: @0@'.format(get_option('build-tests')),
|
|
|
|
' Documentation: @0@'.format(get_option('documentation')),
|
|
|
|
' Demos: @0@'.format(get_option('demos')),
|
|
|
|
'Directories:',
|
|
|
|
' prefix: @0@'.format(gtk_prefix),
|
|
|
|
' includedir: @0@'.format(gtk_includedir),
|
|
|
|
' libdir: @0@'.format(gtk_libdir),
|
|
|
|
' datadir: @0@'.format(gtk_datadir),
|
2017-08-18 15:56:09 +00:00
|
|
|
'------',
|
|
|
|
''
|
|
|
|
]
|
|
|
|
|
|
|
|
message('\n'.join(summary))
|
|
|
|
|
2017-04-26 14:59:43 +00:00
|
|
|
# Keep this in sync with post-install.sh expected arguments
|
|
|
|
meson.add_install_script('build-aux/meson/post-install.sh',
|
2017-08-14 21:29:44 +00:00
|
|
|
gtk_api_version,
|
2017-04-26 14:59:43 +00:00
|
|
|
gtk_binary_version,
|
|
|
|
gtk_libdir,
|
|
|
|
gtk_datadir)
|