forked from Me-TV/Me-TV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
88 lines (72 loc) · 2.62 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
project(
'Me TV',
'rust',
version: '3.1.0', # Ensure this is the same as the version number in Cargo.toml
default_options: ['buildtype=release'],
license: 'GPLv3',
)
application_id = 'uk.org.winder.me-tv'
prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
dependency('glib-2.0', version: '>= 2.56') # 2.60.6 on flatpak
dependency('gio-2.0', version: '>= 2.56') # 2.60.6 on flatpak
dependency('gtk+-3.0', version: '>= 3.22') # 3.24.20 on flatpak
dependency('gstreamer-1.0', version: '>= 1.16') # 1.16.2 on flatpak
dependency('gstreamer-plugins-base-1.0', version: '>= 1.16') # 1.16.2 on flatpak
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.16') # 1.16.2 on flatpak
dependency('gstreamer-mpegts-1.0', version: '>= 1.16') # 1.16.2 on flatpak
cargo = find_program('cargo')
cargo_script = find_program('scripts/cargo.sh')
sources = run_command('sh', '-c', 'cd ${MESON_SOURCE_ROOT} && ls src/*.rs').stdout().strip().split()
me_tv_target_name = 'me-tv'
me_tv = custom_target(
me_tv_target_name,
build_by_default: true,
console: true,
input: sources,
output: [me_tv_target_name],
install: true,
install_dir: bindir,
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@', get_option('buildtype'),]
)
me_tv_recording_target_name = me_tv_target_name + '-record'
me_tv_recording = custom_target(
me_tv_recording_target_name,
build_by_default: true,
console: true,
input: 'src/bin/' + me_tv_recording_target_name + '.rs',
output: [me_tv_recording_target_name],
install: true,
install_dir: bindir,
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@', get_option('buildtype'),]
)
me_tv_schedule_target_name = me_tv_target_name + '-schedule'
me_tv_schedule = custom_target(
me_tv_schedule_target_name,
build_by_default: true,
console: true,
input: 'src/bin/' + me_tv_schedule_target_name + '.rs',
output: [me_tv_schedule_target_name],
install: true,
install_dir: bindir,
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@', get_option('buildtype'),]
)
install_man('doc/me-tv.1')
install_data(
'data/@[email protected]'.format(application_id),
install_dir: datadir / 'applications'
)
install_data(
'data/@[email protected]'.format(application_id),
install_dir: datadir / 'metainfo'
)
install_data(
'src/resources/images/@[email protected]'.format(application_id),
install_dir: datadir / 'icons' / 'hicolor' / '48x48' / 'apps'
)
meson.add_dist_script(
'scripts/dist-vendor.sh',
meson.build_root() / 'meson-dist' / meson.project_name() + '-' + meson.project_version(),
meson.source_root()
)