-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
136 lines (117 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
project(
'com.github.cjfloss.feedler', 'vala', 'c',
version : '0.1.0',
license : 'LGPL2+'
)
gnome = import ('gnome')
i18n = import ('i18n')
add_global_arguments (
'-DGETTEXT_PACKAGE="' + meson.project_name () + '"',
language: 'c'
)
release_name = 'beta'
prefix = get_option ('prefix')
datadir = join_paths (prefix, get_option ('datadir'))
pkg_datadir = join_paths (datadir, meson.project_name ())
if find_program ('git', required: false).found ()
GIT_BRANCH = run_command ('git', 'rev-parse', '--abbrev-ref', 'HEAD')
GIT_COMMIT_HASH = run_command ('git','log', '-1', '--format=%h')
git_branch = GIT_BRANCH.stdout ().strip ()
git_commit_hash = GIT_COMMIT_HASH.stdout ().strip ()
version_info = 'git-' + git_branch + '-' + git_commit_hash
else
git_branch = 'no-git'
git_commit_hash = 'no-git'
version_info = release_name
endif
config = configuration_data ()
config.set ('app_name', meson.project_name ())
config.set ('prefix', prefix)
config.set ('datadir', datadir)
config.set ('pkg_datadir', pkg_datadir)
config.set ('gettext_package', meson.project_name ())
config.set ('release_name', release_name)
config.set ('version', meson.project_version ())
config.set ('version_info', version_info)
config.set ('git_branch', git_branch)
config.set ('git_commit_hash', git_commit_hash)
build_config = configure_file (
input: 'src/Build.vala.in',
output: 'Build.vala',
configuration: config
)
dependencies = [
dependency('glib-2.0'),
dependency('gtk+-3.0'),
dependency('granite', version :'>=0.3.0'),
dependency('webkit2gtk-4.0'),
dependency('sqlite3'),
meson.get_compiler('vala').find_library('posix'),
meson.get_compiler('c').find_library('m', required : false)
]
if get_option('libunity')
unity_dep = dependency('unity')
add_project_arguments('--define=UNITY_SUPPORT=1', language : 'vala')
dependencies += unity_dep
endif
service = executable (
meson.project_name () + '-service',
'src/Service/Abstract.vala',
'src/Service/Backend-xml.vala',
'src/Objects/Channel.vala',
'src/Objects/Folder.vala',
'src/Objects/Item.vala',
'src/Objects/State.vala',
'src/Service/Serializer.vala',
'src/Service/Service.vala',
'src/Service/Settings.vala',
dependencies : [
dependency ('libnotify'),
dependency ('granite', version :'>=0.3.0'),
dependency ('libsoup-2.4'),
dependency ('libxml-2.0'),
meson.get_compiler ('vala').find_library ('posix'),
meson.get_compiler ('c').find_library ('m', required: false)
],
install : true
)
main = executable (
meson.project_name (),
'src/Data/DB.vala',
'src/Data/Queries.vala',
'src/Data/Database.vala',
'src/Objects/Channel.vala',
'src/Objects/Folder.vala',
'src/Objects/Item.vala',
'src/Objects/State.vala',
'src/Dock.vala',
'src/Feedler.vala',
'src/Icons.vala',
'src/History.vala',
'src/Manager.vala',
'src/Settings.vala',
'src/Window.vala',
'src/Widget/Folder.vala',
'src/Widget/Infobar.vala',
'src/Widget/Layout.vala',
'src/Widget/Menu.vala',
'src/Widget/Preferences.vala',
'src/Widget/Sidebar.vala',
'src/Widget/SidebarCell.vala',
'src/Widget/Statusbar.vala',
'src/Widget/Subscription.vala',
'src/Widget/Toolbar.vala',
'src/Widget/View.vala',
'src/Widget/ViewCell.vala',
'src/Widget/ViewList.vala',
'src/Widget/ViewWeb.vala',
'src/Service/Interface.vala',
'src/Service/Serializer.vala',
build_config,
dependencies: dependencies,
install : true
)
subdir ('po')
subdir ('data')
#subdir ('src')
meson.add_install_script ('build-aux/meson_post_install.py')