Avoid use of link_whole in the gsettings backend
[dconf.git] / meson.build
bloba7497f1384545f100e8d79b6452a3dd65bf05a07
1 project(
2   'dconf', ['c', 'vala'],
3   version: '0.28.0',
4   license: 'LGPL2.1+',
5   meson_version: '>= 0.46.0',
8 dconf_prefix = get_option('prefix')
9 dconf_datadir = join_paths(dconf_prefix, get_option('datadir'))
10 dconf_libdir = join_paths(dconf_prefix, get_option('libdir'))
11 dconf_libexecdir = join_paths(dconf_prefix, get_option('libexecdir'))
12 dconf_mandir = join_paths(dconf_prefix, get_option('mandir'))
14 dconf_namespace = 'ca.desrt.dconf'
16 soversion = 1
17 current = 0
18 revision = 0
19 libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
21 cc = meson.get_compiler('c')
22 valac = meson.get_compiler('vala')
24 # compiler flags
25 common_flags = []
27 if get_option('buildtype').contains('debug')
28   common_flags += cc.get_supported_arguments([
29     '-fno-common',
30     '-Wmissing-prototypes',
31     '-Wwrite-strings',
32   ])
33 endif
35 add_project_arguments(common_flags, language: 'c')
37 gio_req_version = '>= 2.25.7'
39 gio_dep = dependency('gio-2.0', version: gio_req_version)
40 gio_unix_dep = dependency('gio-unix-2.0', version: gio_req_version)
41 glib_dep = dependency('glib-2.0', version: '>= 2.44.0')
43 gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir', define_variable: ['libdir', dconf_libdir])
44 dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir', dconf_datadir])
45 vapi_dir = dependency('vapigen').get_pkgconfig_variable('vapidir', define_variable: ['datadir', dconf_datadir])
47 enable_bash_completion = get_option('bash_completion')
48 if enable_bash_completion
49   # FIXME: the `.pc` file is wrong because `completionsdir` should be relative to `datadir`, not `prefix`
50   completions_dir = dependency('bash-completion').get_pkgconfig_variable('completionsdir', define_variable: ['prefix', dconf_prefix])
51 endif
53 configure_file(
54   output: 'config.h',
55   configuration: configuration_data(),
58 test_env = [
59   'G_DEBUG=gc-friendly,fatal-warnings',
60   'MALLOC_CHECK_=2',
61   'LC_ALL=C.UTF-8',
64 gnome = import('gnome')
65 pkg = import('pkgconfig')
67 top_inc = include_directories('.')
69 subdir('shm')
70 subdir('gvdb')
71 subdir('common')
72 subdir('engine')
73 subdir('service')
74 subdir('gdbus')
75 subdir('gsettings')
76 subdir('client')
77 subdir('bin')
78 subdir('docs')
79 subdir('tests')
81 meson.add_install_script('meson_post_install.py', gio_module_dir)