2 'dconf', ['c', 'vala'],
6 'buildtype=debugoptimized',
9 meson_version: '>= 0.41.0'
12 dconf_version = meson.project_version()
13 version_array = dconf_version.split('.')
14 dconf_major_version = version_array[0].to_int()
15 dconf_minor_version = version_array[1].to_int()
16 dconf_micro_version = version_array[2].to_int()
18 dconf_prefix = get_option('prefix')
19 dconf_bindir = join_paths(dconf_prefix, get_option('bindir'))
20 dconf_datadir = join_paths(dconf_prefix, get_option('datadir'))
21 dconf_includedir = join_paths(dconf_prefix, get_option('includedir'))
22 dconf_libdir = join_paths(dconf_prefix, get_option('libdir'))
23 dconf_libexecdir = join_paths(dconf_prefix, get_option('libexecdir'))
24 dconf_mandir = join_paths(dconf_prefix, get_option('mandir'))
26 dconf_namespace = 'ca.desrt.dconf'
31 libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
33 cc = meson.get_compiler('c')
34 valac = meson.get_compiler('vala')
36 config_h = configuration_data()
40 ['PACKAGE', meson.project_name()],
41 ['PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/dconf/issues'],
42 ['PACKAGE_NAME', meson.project_name()],
43 ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), dconf_version)],
44 ['PACKAGE_TARNAME', meson.project_name()],
45 ['PACKAGE_URL', 'https://wiki.gnome.org/Projects/dconf'],
46 ['PACKAGE_VERSION', dconf_version],
47 ['VERSION', dconf_version],
48 ['GETTEXT_PACKAGE', meson.project_name()]
51 foreach define: set_defines
52 config_h.set_quoted(define[0], define[1])
56 common_flags = ['-DHAVE_CONFIG_H']
58 if get_option('buildtype').contains('debug')
61 '-Wmissing-prototypes',
65 foreach cflag: test_cflags
66 if cc.has_argument(cflag)
67 common_flags += [cflag]
72 add_project_arguments(common_flags, language: 'c')
74 gio_unix_req_version = '>= 2.25.7'
76 glib_dep = dependency('glib-2.0', version: '>= 2.44.0')
77 gio_unix_dep = dependency('gio-unix-2.0', version: gio_unix_req_version)
79 gio_querymodules = find_program('gio-querymodules', required: false)
80 if gio_querymodules.found()
81 gio_modules_dir = get_option('with-gio-modules-dir').strip()
82 if gio_modules_dir == ''
83 gio_modules_dir = join_paths(dconf_libdir, 'gio', 'modules')
86 meson.add_install_script('meson_post_install.py', gio_querymodules.path(), gio_modules_dir)
91 configuration: config_h
95 'G_DEBUG=gc-friendly,fatal-warnings',
100 gnome = import('gnome')
101 pkg = import('pkgconfig')
103 top_inc = include_directories('.')