-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
meson.build
106 lines (94 loc) · 2.93 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
project('io.github.lainsce.Quilter', ['vala', 'c'], version: '3.3.3')
gnome = import('gnome')
i18n = import('i18n')
add_project_arguments([
'--target-glib=2.40',
],
language: 'vala',
)
if get_option('profile') == 'development'
name_prefix = '(Development) '
profile = 'Devel'
else
name_prefix = ''
profile = ''
endif
app_id = 'io.github.lainsce.Quilter@0@'.format(profile)
conf = configuration_data()
conf.set_quoted('APP_ID', app_id)
conf.set_quoted('G_LOG_DOMAIN', 'io.github.lainsce.Quilter@0@'.format(profile))
conf.set_quoted('NAME_PREFIX', name_prefix)
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('PROFILE', profile)
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
configure_file(output: 'config.h', configuration: conf)
config_h_dir = include_directories('.')
add_project_arguments(
'-include', 'config.h',
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
language: 'c'
)
asresources = gnome.compile_resources(
'as-resources', 'data/app.gresource.xml',
source_dir: 'data',
c_name: 'as'
)
sources = files(
'src/Application.vala',
'src/MainWindow.vala',
'src/Widgets/HeaderBar.vala',
'src/Widgets/HeaderBarButton.vala',
'src/Widgets/SourceView.vala',
'src/Widgets/WebView.vala',
'src/Widgets/SearchBar.vala',
'src/Widgets/StatusBar.vala',
'src/Widgets/SideBar.vala',
'src/Widgets/SideBarBox.vala',
'src/Widgets/Preferences.vala',
'src/Plugins/PluginManager.vala',
'src/Plugins/Plugin.vala',
'src/Plugins/Image.vala',
'src/Plugins/Filep.vala',
'src/Plugins/Checkbox.vala',
'src/Plugins/CheckboxChecked.vala',
'src/Plugins/Highlighter.vala',
'src/Plugins/Superscript.vala',
'src/Plugins/Subscript.vala',
'src/Styles/quilter.vala',
'src/Styles/quilterdark.vala',
'src/Styles/quiltersepia.vala',
'src/Constants/AppSettings.vala',
'src/Services/FileManager.vala',
'src/Services/ExportUtils.vala',
'src/Services/DialogUtils.vala',
)
cc = meson.get_compiler('c')
libmarkdown = cc.find_library('markdown', required: true)
dependencies = [
dependency('gee-0.8'),
dependency('gtk4'),
dependency('libadwaita-1'),
dependency('webkitgtk-6.0'),
dependency('gtksourceview-5'),
libmarkdown,
cc.find_library('m', required: true)
]
executable(
meson.project_name(),
sources,
asresources,
dependencies: dependencies,
vala_args: [meson.source_root() + '/vapi/libmarkdown.vapi', meson.source_root() + '/src/Config.vapi'],
install : true
)
subdir('data')
subdir('po')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true
)