-
Notifications
You must be signed in to change notification settings - Fork 25
/
meson.build
executable file
·80 lines (68 loc) · 1.87 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
project('com.github.donadigo.appeditor', ['vala', 'c'],
version: '1.1.4')
i18n = import('i18n')
gnome = import('gnome')
add_project_arguments(
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
language: 'c'
)
conf = configuration_data()
conf.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_file = configure_file(
input: 'src' / 'Config.vala.in',
output: '@BASENAME@',
configuration: conf
)
vala = meson.get_compiler('vala')
vala_flags = []
deps = [
dependency('granite', version: '>= 5.4.0'),
dependency('gtk+-3.0'),
dependency('gee-0.8'),
vala.find_library('posix')
]
if vala.version().version_compare('>= 0.40.0')
vala_flags += ['--define', 'HAS_VALA040']
endif
if get_option('flatpak')
add_project_arguments('--define=FLATPAK', language: 'vala')
endif
add_project_arguments(vala_flags, language: 'vala')
asresources = gnome.compile_resources(
'as-resources', 'data/' + meson.project_name() + '.gresource.xml',
source_dir: 'data',
c_name: 'as'
)
executable(
meson.project_name(),
config_file,
'src/Application.vala',
'src/MainWindow.vala',
'src/AppSourceList.vala',
'src/AppItem.vala',
'src/CategoryItem.vala',
'src/IconButton.vala',
'src/SettingBox.vala',
'src/PersistentPlaceholderEntry.vala',
'src/FieldEntry.vala',
'src/CategoryComboBox.vala',
'src/AppInfoViewStack.vala',
'src/AppInfoView.vala',
'src/AppDirectoryScanner.vala',
'src/DesktopApp.vala',
'src/DesktopAppManager.vala',
'src/AppInfoViewSaver.vala',
'src/IconListBox.vala',
'src/IconChooserDialog.vala',
'src/IconRow.vala',
'src/Constants.vala',
asresources,
dependencies: [
deps
],
install : true
)
meson.add_install_script('meson/post_install.py')
subdir('data')
subdir('po')