-
Notifications
You must be signed in to change notification settings - Fork 102
/
meson.build
76 lines (69 loc) · 2.09 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
# project name and programming language
project('com.github.babluboy.bookworm', ['vala', 'c'],
version: '1.1.2'
)
version = '1.1.2'
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')
tasks_dir = join_paths(scripts_dir, 'tasks')
mobilib_dir = join_paths(scripts_dir, 'mobi_lib')
asresources = gnome.compile_resources(
'as-resources', 'data/com.github.babluboy.bookworm.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', '--thread' , '--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/bookworm.vala',
'src/utils.vala',
'src/ePubReader.vala',
'src/book.vala',
'src/database.vala',
'src/settings.vala',
'src/bookinfo.vala',
'src/headerbar.vala',
'src/dialog.vala',
'src/window.vala',
'src/prefpopover.vala',
'src/library.vala',
'src/pdfReader.vala',
'src/contentHandler.vala',
'src/comicsReader.vala',
'src/backgroundTasks.vala',
'src/mobiReader.vala',
'src/fb2Reader.vala',
'src/shortcuts.vala',
'src/xmlHandler.vala',
asresources,
vala_args: vala_args,
link_args: '-lm',
dependencies: [
dependency('gtk+-3.0'),
dependency('gee-0.8'),
dependency('webkit2gtk-4.0'),
dependency('poppler-glib'),
dependency('libxml-2.0'),
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')