1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
project(
'gnome-bluetooth', 'c',
version: '3.32.1',
license: 'GPL2+',
default_options: 'buildtype=debugoptimized',
meson_version: '>= 0.49.0',
)
gnomebt_version = meson.project_version()
version_array = gnomebt_version.split('.')
gnomebt_major_version = version_array[0].to_int()
gnomebt_minor_version = version_array[1].to_int()
gnomebt_micro_version = version_array[2].to_int()
gnomebt_api_version = '1.0'
gnomebt_api_name = '@0@-@1@'.format(meson.project_name(), gnomebt_api_version)
gnomebt_gir_ns = 'GnomeBluetooth'
gnomebt_gettext_package = meson.project_name() + '2'
gnomebt_prefix = get_option('prefix')
gnomebt_datadir = get_option('datadir')
gnomebt_localedir = get_option('localedir')
gnomebt_pkgdatadir = gnomebt_datadir / meson.project_name()
# options
enable_gtk_doc = get_option('gtk_doc')
enable_gir = get_option('introspection')
# Before making a release, the GNOMEBT_LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
current = 13
revision = 2
age = 0
libversion = '@0@.@1@.@2@'.format(current, age, revision)
gnome = import('gnome')
i18n = import('i18n')
pkg = import('pkgconfig')
po_dir = meson.current_source_dir() / 'po'
top_inc = include_directories('.')
cc = meson.get_compiler('c')
config_h = configuration_data()
#i18n
config_h.set_quoted('GETTEXT_PACKAGE', gnomebt_gettext_package)
config_h.set_quoted('LOCALEDIR', gnomebt_prefix / gnomebt_localedir)
# compiler flags
common_flags = [
'-DHAVE_CONFIG_H',
'-DBONOBO_DISABLE_DEPRECATED',
'-DBONOBO_DISABLE_SINGLE_INCLUDES',
'-DBONOBO_UI_DISABLE_DEPRECATED',
'-DBONOBO_UI_DISABLE_SINGLE_INCLUDES',
'-DGCONF_DISABLE_DEPRECATED',
'-DGCONF_DISABLE_SINGLE_INCLUDES',
'-DGNOME_DISABLE_DEPRECATED',
'-DGNOME_DISABLE_SINGLE_INCLUDES',
'-DGNOME_VFS_DISABLE_DEPRECATED',
'-DGNOME_VFS_DISABLE_SINGLE_INCLUDES',
'-DLIBGLADE_DISABLE_DEPRECATED',
'-DLIBGLADE_DISABLE_SINGLE_INCLUDES',
'-DLIBSOUP_DISABLE_DEPRECATED',
'-DLIBSOUP_DISABLE_SINGLE_INCLUDES',
'-DWNCK_DISABLE_DEPRECATED',
'-DWNCK_DISABLE_SINGLE_INCLUDES',
]
compiler_flags = []
if get_option('buildtype').contains('debug')
compiler_flags += cc.get_supported_arguments([
'-Werror=format=2',
'-Werror=implicit-function-declaration',
'-Werror=init-self',
'-Werror=missing-prototypes',
'-Werror=missing-include-dirs',
'-Werror=pointer-arith',
'-Werror=return-type',
'-Wnested-externs',
'-Wstrict-prototypes',
])
endif
add_project_arguments(common_flags + compiler_flags, language: 'c')
gio_dep = dependency('gio-2.0')
gio_unix_dep = dependency('gio-unix-2.0')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.12.0')
libcanberra_gtk_dep = dependency('libcanberra-gtk3')
libnotify_dep = dependency('libnotify', version: '>= 0.7.0')
libudev_dep = dependency('libudev')
m_dep = cc.find_library('m')
subdir('icons')
subdir('lib')
subdir('sendto')
if enable_gtk_doc
subdir('docs/reference/libgnome-bluetooth')
endif
subdir('po')
configure_file(
output: 'config.h',
configuration: config_h,
)
meson.add_install_script(
'meson_post_install.py',
get_option('icon_update') ? 'icon_update' : '',
gnomebt_datadir,
)
output = '\nConfigure summary:\n\n'
output += ' Compiler....................: ' + cc.get_id() + '\n\n'
output += ' Compiler Flags..............: ' + ' '.join(compiler_flags) + '\n'
output += ' Prefix......................: ' + gnomebt_prefix + '\n'
output += ' Documentation...............: ' + enable_gtk_doc.to_string() + '\n'
output += ' GObject-Introspection.......: ' + enable_gir.to_string()
message(output)
|