-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
89 lines (77 loc) · 2.2 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
project(
'wingpanel-indicator-caffeine',
'vala',
'c',
version : '0.1.0'
)
app_id = 'com.paysonwallach.caffeine'
app_name = 'Caffeine'
i18n = import('i18n')
vala = meson.get_compiler('vala')
po_dir = join_paths(meson.current_source_dir(), 'po')
vapi_dir = join_paths(meson.source_root(), 'vapi')
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
pkglibdir = join_paths(libdir, app_id)
pkgdatadir = join_paths(datadir, app_id)
pkgpluginslibdir = join_paths(pkglibdir, 'plugins')
pkgpluginsdatadir = join_paths(pkgdatadir, 'plugins')
granite_dep = dependency('granite')
glib_json_dep = dependency('json-glib-1.0')
libnotify_dep = dependency('libnotify')
libpeas_dep = dependency('libpeas-1.0', version: '>=1.1.0')
libpeas_gtk_dep = dependency('libpeas-gtk-1.0', version: '>=1.1.0')
libwingpanel_dep = dependency('wingpanel-2.0')
indicators_dir = libwingpanel_dep.get_pkgconfig_variable(
'indicatorsdir',
define_variable : [
'libdir',
libdir
]
)
conf_data = configuration_data()
conf_data.set_quoted('APP_ID', app_id)
conf_data.set_quoted('APP_NAME', app_name)
conf_data.set_quoted('PKGDATA_DIR', pkgdatadir)
conf_data.set_quoted('PKGPLUGINS_LIB_DIR', pkgpluginslibdir)
conf_data.set_quoted('PKGPLUGINS_DATA_DIR', pkgpluginsdatadir)
conf_data.set_quoted('DATA_VERSION', '0')
config_h = configure_file(
output: 'config.h',
configuration: conf_data
)
config_dep = declare_dependency(
dependencies: vala.find_library('config', dirs: vapi_dir),
sources: config_h
)
add_project_arguments([
'-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name())
],
language:'c'
)
shared_module(
meson.project_name(),
'src/Indicator.vala',
'src/MenuButton.vala',
'src/CancellableTimeout.vala',
'src/Countdown.vala',
'src/CountdownTimerController.vala',
'src/Duration.vala',
'src/Utils.vala',
dependencies: [
config_dep,
granite_dep,
glib_json_dep,
libnotify_dep,
libwingpanel_dep,
libpeas_dep,
libpeas_gtk_dep,
],
install: true,
install_dir: indicators_dir
)
subdir('data')
subdir('plugins')
meson.add_install_script('meson/post_install.py')