forked from solus-project/budgie-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
123 lines (100 loc) · 3.37 KB
/
meson.build
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
project(
'budgie-desktop',
['c', 'vala'],
version: '10.2.9',
license: [
'GPL-2.0',
'LGPL-2.1',
],
default_options: [
'c_std=c11',
],
)
version_flags = [
'-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_18',
'-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_18',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_46',
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46',
]
am_cflags = [
'-fstack-protector',
'-pedantic',
'-Wstrict-prototypes',
'-Wundef',
'-Werror-implicit-function-declaration',
'-Wformat',
'-Wformat-security',
'-Werror=format-security',
'-Wconversion',
'-Wunused-variable',
'-Wunreachable-code',
'-Wall',
'-W',
version_flags,
]
add_global_arguments(am_cflags, language: 'c')
meson.add_install_script('meson_post_install.sh')
# Budgie needs a minimum 3.18 GNOME stack
gnome_minimum_version = '>= 3.18.0'
dep_gtk3 = dependency('gtk+-3.0', version: gnome_minimum_version)
dep_glib = dependency('glib-2.0', version: '>= 2.46.0')
dep_peas = dependency('libpeas-1.0', version: '>= 1.8.0')
dep_gdkx11 = dependency('gdk-x11-3.0', version: gnome_minimum_version)
dep_libuuid = dependency('uuid')
# Needed for keyboardy bits
dep_ibus = dependency('ibus-1.0', verion: '>= 1.5.10')
dep_gnomedesktop = dependency('gnome-desktop-3.0', version: gnome_minimum_version)
dep_gsettings = dependency('gsettings-desktop-schemas', version: gnome_minimum_version)
# wnck used all over the place..
dep_wnck = dependency('libwnck-3.0', version: '>= 3.14.0')
# accountsservice in multiple applets
dep_accountsservice = dependency('accountsservice', version: '>= 0.6.40')
# Create config.h
cdata = configuration_data()
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
# Make gettext work
cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
add_global_arguments('-DGETTEXT_PACKAGE="budgie-desktop"', language: 'c')
# Globals that we need
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
confdir = join_paths(prefix, get_option('sysconfdir'))
datadir = join_paths(prefix, get_option('datadir'))
localedir = join_paths(prefix, get_option('localedir'))
podir = join_paths(meson.source_root(), 'po')
# Handle i18n on the .desktop file
# Originally stolem from TingPing:
# https://github.com/vinszent/gnome-twitch/blob/master/data/meson.build
# Later changed to use intltool as we use _Key style files
intltool = find_program('intltool-merge')
# Make sure this is accessible to panel applet builds
plugin_libdir = join_paths(libdir, meson.project_name(), 'plugins')
cdata.set_quoted('MODULEDIR', plugin_libdir)
cdata.set_quoted('MODULE_DATA_DIR', join_paths(datadir, meson.project_name(), 'plugins'))
cdata.set_quoted('DATADIR', datadir)
cdata.set_quoted('SYSCONFDIR', confdir)
cdata.set_quoted('LOCALEDIR', localedir)
cdata.set_quoted('PACKAGE_URL', 'https://budgie-desktop.org')
# Write config.h
configure_file(
output: 'config.h',
configuration: cdata,
)
# Enable others to find this .h file
extra_includes = [
include_directories('.'),
]
# Determine if polkit is allowed.
with_polkit = get_option('with-polkit')
# Get gvc built before we do anything
gvc = subproject('gvc')
# Prep translations prior to build
subdir('po')
# Now build Budgie proper
subdir('src')
# Documentation...
if get_option('with-gtk-doc') == true
subdir('docs')
endif
# And lastly, data bits
subdir('data')