-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmeson.build
More file actions
83 lines (68 loc) · 2.23 KB
/
meson.build
File metadata and controls
83 lines (68 loc) · 2.23 KB
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
project(
'LEDSuite',
'c',
version : '1.0.0-rc7',
meson_version : '>= 1.3.0',
license : 'GPL-3.0-or-later'
)
developer_name = 'ToxicStoxm'
developer_id = 'com.@0@'.format(developer_name.to_lower())
project_id = '@0@.@1@'.format(developer_id, meson.project_name())
scripts_dir = '@0@/scripts'.format(meson.project_source_root())
jar_filename = '@0@-fat-@1@.jar'.format(meson.project_name(), meson.project_version())
final_jar_path = '@0@/@1@.jar'.format(get_option('prefix') / get_option('bindir'), meson.project_name())
i18n = import('i18n')
gnome = import('gnome')
dependency('gtk4', version: '>= 4.16')
dependency('libadwaita-1', version: '>= 1.6')
dependency('glib-2.0', version: '>= 2.66')
dependency('gio-2.0', version: '>= 2.82')
find_program('glib-compile-resources', required: true)
gradle = find_program(
'gradle',
dirs : ['/usr/lib/sdk/openjdk/gradle/bin'],
required : false
)
if not gradle.found()
gradle = find_program('gradlew')
endif
cp = find_program('cp')
env = environment()
if get_option('javadir') != ''
env.set('JAVA_HOME', get_option('javadir'))
endif
metadata_conf = {
'ID' : project_id,
'NAME' : meson.project_name(),
'DEVELOPER_ID' : developer_id,
'DEVELOPER_NAME' : developer_name,
'DESKTOP_FILE' : '@0@.desktop'.format(project_id),
'VERSION' : meson.project_version(),
'COMMAND' : meson.project_name()
}
subdir('data')
subdir('src/main/resources')
custom_target(
'compile-project',
depends : [appdata],
input : [configure_file(
input : 'build.gradle.kts',
output : 'build.gradle.kts',
configuration : metadata_conf,
install : false
)],
build_by_default : true, # Always recompile the project
build_always_stale : true,
console : true,
command : [gradle.full_path(), 'build'],
env : env,
install_dir : [get_option('libdir'), get_option('bindir')],
output : [jar_filename]
)
subdir('po')
subdir('scripts')
gnome.post_install(
gtk_update_icon_cache: true,
glib_compile_schemas: false,
update_desktop_database: true,
)