-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
98 lines (80 loc) · 2.14 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
# Project name, programming language and version
project (
'com.github.casasfernando.wingpanel-indicator-weather',
'c', 'vala',
version: '0.7.6'
)
# GNOME module
gnome = import ('gnome')
# Translation module
i18n = import ('i18n')
# Project arguments
add_project_arguments (
'-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name ()),
language: 'c'
)
add_project_arguments (
['--vapidir', join_paths (meson.current_source_dir (), 'vapi')],
language: 'vala'
)
# Listing dependencies
wingpanel = dependency ('wingpanel')
common_dependencies = [
dependency ('granite'),
dependency ('gtk+-3.0'),
dependency ('gee-0.8'),
dependency ('glib-2.0'),
dependency ('libgeoclue-2.0'),
dependency ('gweather-3.0'),
wingpanel
]
executable_dependencies = [
common_dependencies,
dependency ('libhandy-1'),
meson.get_compiler ('c').find_library ('m', required : false),
meson.get_compiler ('vala').find_library ('posix')
]
indicator_dependencies = [
common_dependencies,
dependency ('gdk-x11-3.0'),
dependency ('libnotify')
]
# Compiling resources
asresources = gnome.compile_resources (
'as-resources',
join_paths ('data', meson.project_name ()) + '.gresource.xml',
source_dir: 'data',
c_name: 'as'
)
# Config
config_data = configuration_data ()
config_data.set_quoted ('GETTEXT_PACKAGE', meson.project_name ())
configure_file (output: 'config.h', configuration: config_data)
c_args = [
'-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE',
'-include', 'config.h',
'-w',
]
subdir ('src')
# Define executable
executable (
meson.project_name (),
executable_sources,
asresources,
c_args: c_args,
dependencies: executable_dependencies,
install: true
)
# Define indicator
shared_module (
'wingpanel-indicator-weather',
indicator_sources,
asresources,
c_args: c_args,
dependencies: indicator_dependencies,
install: true,
install_dir : wingpanel.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', join_paths (get_option ('prefix'), get_option ('libdir'))]),
)
subdir ('data')
subdir ('po')
meson.add_install_script ('meson/post_install.py')