-
Notifications
You must be signed in to change notification settings - Fork 24
/
meson.build
64 lines (57 loc) · 1.72 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
# project name and programming language
project('com.github.babluboy.nutty', ['vala', 'c'],
version: '1.2.0'
)
app_version = meson.project_version()
gnome = import('gnome')
i18n = import('i18n')
# Set all the install directories
install_dir = join_paths(get_option('prefix'), 'share')
scripts_dir = join_paths(install_dir, meson.project_name(), 'scripts')
asresources = gnome.compile_resources(
'as-resources', 'data/com.github.babluboy.nutty.gresource.xml',
source_dir: 'data',
c_name: 'as'
)
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
configure_file(output: 'config.h', configuration: conf)
config_h_dir = include_directories('.')
vala_args = [
'-g', '--target-glib=2.38',
]
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
# Replace parameters in source code
subdir('src')
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
constants_config,
'src/main.vala',
'src/nutty.vala',
'src/headerbar.vala',
'src/utils.vala',
'src/devices.vala',
'src/database.vala',
'src/entities.vala',
'src/xmlHandler.vala',
'src/info.vala',
'src/window.vala',
'src/settings.vala',
'src/shortcuts.vala',
asresources,
vala_args: vala_args,
link_args: '-lm',
dependencies: [
dependency('gtk+-3.0'),
dependency('gee-0.8'),
dependency('libxml-2.0'),
dependency('libnotify'),
dependency('granite', version: '>=0.5'),
dependency('sqlite3', version: '>=3.5.9')
],
install: true
)
meson.add_install_script('meson/post_install.py')
subdir('data')
subdir('po')