2
'gnome-bluetooth', 'c',
6
'buildtype=debugoptimized',
9
meson_version: '>= 0.41.0'
12
gnomebt_version = meson.project_version()
13
version_array = gnomebt_version.split('.')
14
gnomebt_major_version = version_array[0].to_int()
15
gnomebt_minor_version = version_array[1].to_int()
16
gnomebt_micro_version = version_array[2].to_int()
18
gnomebt_api_version = '1.0'
19
gnomebt_api_name = '@0@-@1@'.format(meson.project_name(), gnomebt_api_version)
21
gnomebt_gir_ns = 'GnomeBluetooth'
22
gnomebt_gir_version = '1.0'
24
gnomebt_gettext_package = meson.project_name() + '2'
26
gnomebt_prefix = get_option('prefix')
27
gnomebt_bindir = join_paths(gnomebt_prefix, get_option('bindir'))
28
gnomebt_datadir = join_paths(gnomebt_prefix, get_option('datadir'))
29
gnomebt_includedir = join_paths(gnomebt_prefix, get_option('includedir'))
30
gnomebt_libdir = join_paths(gnomebt_prefix, get_option('libdir'))
31
gnomebt_libexecdir = join_paths(gnomebt_prefix, get_option('libexecdir'))
32
gnomebt_localedir = join_paths(gnomebt_prefix, get_option('localedir'))
33
gnomebt_mandir = join_paths(gnomebt_prefix, get_option('mandir'))
35
gnomebt_pkgdatadir = join_paths(gnomebt_datadir, meson.project_name())
36
gnomebt_pkglibdir = join_paths(gnomebt_libdir, meson.project_name())
38
gnomebt_icondir = join_paths(gnomebt_datadir, 'icons')
40
gnomebt_buildtype = get_option('buildtype')
41
gnomebt_debug = gnomebt_buildtype.contains('debug')
44
enable_gtk_doc = get_option('enable-gtk-doc')
45
enable_gir = get_option('enable-introspection')
47
# Before making a release, the GNOMEBT_LT_VERSION string should be modified.
48
# The string is of the form C:R:A.
49
# - If interfaces have been changed or added, but binary compatibility has
50
# been preserved, change to C+1:0:A+1
51
# - If binary compatibility has been broken (eg removed or changed interfaces)
53
# - If the interface is the same as the previous version, change to C:R+1:A
58
libversion = '@0@.@1@.@2@'.format(current, age, revision)
60
cc = meson.get_compiler('c')
62
config_h = configuration_data()
67
['PACKAGE', meson.project_name()],
68
['PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name()],
69
['PACKAGE_NAME', meson.project_name()],
70
['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), gnomebt_version)],
71
['PACKAGE_TARNAME', meson.project_name()],
73
['PACKAGE_VERSION', gnomebt_version],
74
['VERSION', gnomebt_version],
76
['GETTEXT_PACKAGE', gnomebt_gettext_package],
77
['LOCALEDIR', gnomebt_localedir]
80
foreach define: set_defines
81
config_h.set_quoted(define[0], define[1])
85
config_h.set('NDEBUG', not gnomebt_debug)
86
config_h.set('GNOME_ENABLE_DEBUG', gnomebt_debug)
90
['HAVE_DLFCN_H', 'dlfcn.h'],
91
['HAVE_INTTYPES_H', 'inttypes.h'],
92
['HAVE_MEMORY_H', 'memory.h'],
93
['HAVE_STDINT_H', 'stdint.h'],
94
['HAVE_STDLIB_H', 'stdlib.h'],
95
['HAVE_STRINGS_H', 'strings.h'],
96
['HAVE_STRING_H', 'string.h'],
97
['HAVE_SYS_STAT_H', 'sys/stat.h'],
98
['HAVE_SYS_TYPES_H', 'sys/types.h'],
99
['HAVE_UNISTD_H', 'unistd.h']
102
foreach header: check_headers
103
config_h.set(header[0], cc.has_header(header[1]))
109
'-DBONOBO_DISABLE_DEPRECATED',
110
'-DBONOBO_DISABLE_SINGLE_INCLUDES',
111
'-DBONOBO_UI_DISABLE_DEPRECATED',
112
'-DBONOBO_UI_DISABLE_SINGLE_INCLUDES',
113
'-DGCONF_DISABLE_DEPRECATED',
114
'-DGCONF_DISABLE_SINGLE_INCLUDES',
115
'-DGNOME_DISABLE_DEPRECATED',
116
'-DGNOME_DISABLE_SINGLE_INCLUDES',
117
'-DGNOME_VFS_DISABLE_DEPRECATED',
118
'-DGNOME_VFS_DISABLE_SINGLE_INCLUDES',
119
'-DLIBGLADE_DISABLE_DEPRECATED',
120
'-DLIBGLADE_DISABLE_SINGLE_INCLUDES',
121
'-DLIBSOUP_DISABLE_DEPRECATED',
122
'-DLIBSOUP_DISABLE_SINGLE_INCLUDES',
123
'-DWNCK_DISABLE_DEPRECATED',
124
'-DWNCK_DISABLE_SINGLE_INCLUDES'
131
'-Werror=implicit-function-declaration',
133
'-Werror=missing-prototypes',
134
'-Werror=missing-include-dirs',
135
'-Werror=pointer-arith',
136
'-Werror=return-type',
138
'-Wstrict-prototypes'
141
foreach flag: test_flags
142
if cc.has_argument(flag)
143
compiler_flags += [flag]
148
add_project_arguments(common_flags + compiler_flags, language: 'c')
150
gtk_dep = dependency('gtk+-3.0', version: '>= 3.12.0')
152
m_dep = cc.find_library('m')
153
config_h.set('HAVE_LIBM', m_dep.found() and cc.has_function('sin', dependencies: m_dep))
157
configuration: config_h
160
gnome = import('gnome')
161
i18n = import('i18n')
162
pkg = import('pkgconfig')
164
po_dir = join_paths(meson.source_root(), 'po')
166
top_inc = include_directories('.')
173
subdir('docs/reference/libgnome-bluetooth')
178
meson.add_install_script('meson_post_install.py', get_option('enable-icon-update') ? 'icon-update' : '')
180
output = '\nConfigure summary:\n\n'
181
output += ' Compiler....................: ' + cc.get_id() + '\n\n'
182
output += ' Compiler Flags..............: ' + ' '.join(compiler_flags) + '\n'
183
output += ' Prefix......................: ' + gnomebt_prefix + '\n'
184
output += ' Documentation...............: ' + enable_gtk_doc.to_string() + '\n'
185
output += ' GObject-Introspection.......: ' + enable_gir.to_string()