forked from gnome-pomodoro/gnome-pomodoro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
139 lines (126 loc) · 3.5 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
project(
'gnome-pomodoro',
['vala', 'c'],
version: '0.24.2',
meson_version: '>=0.58.0',
)
i18n = import('i18n')
gnome = import ('gnome')
glib_dep = dependency('glib-2.0', version: '>=2.38.0')
gobject_dep = dependency('gobject-2.0', version: '>=2.38.0')
gio_dep = dependency('gio-2.0', version: '>=2.38.0')
gtk_dep = dependency('gtk+-3.0', version: '>=3.20.0')
gdk_dep = dependency('gdk-pixbuf-2.0')
cairo_dep = dependency('cairo')
introspection_dep = dependency('gobject-introspection-1.0', version: '>=0.10.1')
peas_dep = dependency('libpeas-1.0', version: '>=1.5.0')
gom_dep = dependency('gom-1.0', version: '>=0.3.0')
gstreamer_dep = dependency('gstreamer-1.0', version: '>=1.0.10')
libcanberra_dep = dependency('libcanberra', version: '>=0.30')
json_dep = dependency('json-glib-1.0', version: '>=1.6.2')
sqlite_dep = dependency('sqlite3')
cc = meson.get_compiler('c')
libm_dep = cc.find_library('m')
valac = meson.get_compiler('vala')
posix_dep = valac.find_library('posix')
add_project_arguments(
[
'--vapidir', meson.current_source_dir(),
'--vapidir', meson.current_source_dir() / 'vapi',
'--pkg', 'config',
],
language: 'vala',
)
add_project_arguments(
'-DGETTEXT_PACKAGE="' + meson.project_name() + '"',
language: 'c',
)
# We are going to use these variables later on for the plugins
gschema_dir = get_option('prefix') / get_option('datadir') / 'glib-2.0' / 'schemas'
plugin_libdir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'plugins'
extension_dir = get_option('prefix') / get_option('datadir') / 'gnome-shell' / 'extensions' / '[email protected]'
# TODO: Remove the double quotes from plugins/indicator/extension/config.js.in.
# Right now we have to set the below config values twice because of that,
# the C/Vala code needs these to be quoted (done via `set_quoted`), but
# config.js.in needs them to be unquoted
package_name = meson.project_name()
package_datadir = get_option('prefix') / get_option('datadir') / meson.project_name()
package_string = package_name + ' ' + meson.project_version()
package_version = meson.project_version()
package_bugreport = 'https://github.com/gnome-pomodoro/gnome-pomodoro/issues'
package_url = 'https://gnomepomodoro.org'
gettext_package = package_name
extension_uuid = '[email protected]'
package_localedir = get_option('prefix') / get_option('datadir') / 'locale'
conf = configuration_data()
conf.set_quoted(
'GETTEXT_PACKAGE',
gettext_package,
)
conf.set_quoted(
'GSETTINGS_SCHEMA_DIR',
gschema_dir,
)
conf.set_quoted(
'EXTENSION_UUID',
extension_uuid,
)
conf.set_quoted(
'EXTENSION_DIR',
extension_dir,
)
conf.set_quoted(
'PACKAGE_LOCALE_DIR',
package_localedir,
)
conf.set_quoted(
'PACKAGE_LIB_DIR',
get_option('prefix') / get_option('libdir') / 'gnome-pomodoro',
)
conf.set_quoted(
'PACKAGE_DATA_DIR',
package_datadir,
)
conf.set_quoted(
'PLUGIN_DATA_DIR',
package_datadir / 'plugins',
)
conf.set_quoted(
'PLUGIN_LIB_DIR',
plugin_libdir,
)
conf.set_quoted(
'PACKAGE_NAME',
package_name,
)
conf.set_quoted(
'PACKAGE_STRING',
package_string
)
conf.set_quoted(
'PACKAGE_VERSION',
package_version,
)
conf.set_quoted(
'PACKAGE_URL',
package_url,
)
conf.set_quoted(
'PACKAGE_BUGREPORT',
package_bugreport,
)
configure_file(
output: 'config.h',
configuration: conf,
)
# Include the config.h we just generated
incs = include_directories('.')
subdir('po')
subdir('data')
subdir('src')
subdir('plugins')
subdir('tests')
meson.add_install_script(
'meson-post-install.sh',
get_option('datadir'),
)