Repository navigation
Expand file tree
/
Copy pathmeson.build
More file actions
93 lines (81 loc) · 2.75 KB
/
Copy pathmeson.build
File metadata and controls
93 lines (81 loc) · 2.75 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
83
84
85
86
87
88
89
90
91
92
93
project(
'gst-pipeline-studio',
version: files('VERSION'),
meson_version: '>= 0.63.0',
default_options: [
'warning_level=2',
],
license: 'GPL-3.0-or-later',
)
host_system = host_machine.system()
python3 = find_program('python3')
current_date = run_command(python3, '-c', 'import datetime; print(datetime.datetime.now().strftime("%Y-%m-%d"), end ="")').stdout()
i18n = import('i18n')
host_system = host_machine.system()
dependency('gstreamer-1.0', version: '>= 1.20', fallback: ['gstreamer-1.0'])
dependency('gstreamer-base-1.0', version: '>= 1.20', fallback: ['gstreamer-1.0'])
dependency('gstreamer-video-1.0', version: '>= 1.20', fallback: ['gstreamer-1.0'])
dependency('glib-2.0', version: '>= 2.66')
dependency('gio-2.0', version: '>= 2.66')
dependency('gtk4', version: '>= 4.0.0', fallback: ['gtk4'])
find_program('cargo', required: true)
find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
version = meson.project_version()
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
localedir = prefix / get_option('localedir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()
iconsdir = datadir / 'icons'
podir = meson.project_source_root() / 'po'
gettext_package = meson.project_name()
base_id = 'dev.mooday.GstPipelineStudio'
if get_option('profile') == 'development'
application_id = base_id + '.Devel'
profile = 'Devel'
name_prefix = '(Development) '
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
if vcs_tag == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
endif
else
profile = ''
version_suffix = ''
name_prefix = ''
application_id = base_id
endif
cargo_sources = files(
'Cargo.lock',
'Cargo.toml',
)
if host_system == 'linux'
subdir('data')
endif
subdir('src')
subdir('po')
meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_source_root(),
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
)
if host_system == 'linux'
meson.add_install_script('build-aux/meson/postinstall.py')
endif
# Development setup: install git hooks
fs = import('fs')
pre_commit = find_program('pre-commit', required: false)
if pre_commit.found()
commit_msg_hook = meson.project_source_root() / '.git' / 'hooks' / 'commit-msg'
if not fs.exists(commit_msg_hook)
run_target('install-git-hooks',
command: [pre_commit, 'install', '--hook-type', 'commit-msg'],
)
endif
else
warning('pre-commit not found, run "pip3 install pre-commit" to enable git hooks')
endif