-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
89 lines (71 loc) · 2.7 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
project('producers-dashboard',
version: '3.29.91',
meson_version: '>= 0.46.0'
)
# Importing modules
gnome = import('gnome')
python = import('python3')
# Make sure Python is installed and found
if not python.find_python().found()
error('No valid python3 binary found')
endif
# Constants
PACKAGE_URL = 'https://github.com/UoC-Radio/producers-dashboard'
PROJECT_RDNN_NAME = 'gr.uoc.radio.dashboard'
# NAME_SUFFIX is used in the about dialog
if get_option('profile') == 'development'
PROFILE = 'Devel'
NAME_SUFFIX = ' (Development Snapshot)'
else
PROFILE = ''
NAME_SUFFIX = ''
endif
APPLICATION_ID = 'gr.uoc.radio.dashboard@0@'.format(PROFILE)
PYTHON_DIR = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
PKGDATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), APPLICATION_ID)
PKGLIB_DIR = join_paths(get_option('prefix'), get_option('libdir'), APPLICATION_ID)
# Dependencies
dependency('gobject-introspection-1.0', version: '>= 1.35.0')
dependency('gtk+-3.0', version: '>= 3.19.3')
dependency('libdazzle-1.0', version: '>= 3.28.0')
dependency('libmediaart-2.0', version: '>= 1.9.1')
dependency('pygobject-3.0', version: '>= 3.29.1')
dependency('py3cairo', version: '>= 1.14.0')
subdir('data')
install_subdir(
'dashboard',
install_dir: PYTHON_DIR
)
# Install the executable file
bin_config = configuration_data()
bin_config.set('application_id', APPLICATION_ID)
bin_config.set('rdnn_name', PROJECT_RDNN_NAME)
bin_config.set('pkgdatadir', PKGDATA_DIR)
bin_config.set('localedir', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
bin_config.set('pythondir', PYTHON_DIR)
bin_config.set('pyexecdir', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
bin_config.set('schemasdir', '')
bin_config.set('local_build', 'False')
configure_file(
input: 'producers-dashboard.in',
output: 'producers-dashboard',
configuration: bin_config,
install_dir: get_option('bindir')
)
# Install the builddir executable
local_config = configuration_data()
local_config.set('application_id', APPLICATION_ID)
local_config.set('rdnn_name', PROJECT_RDNN_NAME)
local_config.set('pkgdatadir', join_paths(meson.build_root(), 'data'))
local_config.set('localedir', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
local_config.set('pythondir', meson.source_root())
local_config.set('pyexecdir', meson.source_root())
local_config.set('schemasdir', join_paths(meson.build_root(), 'data'))
local_config.set('local_build', 'True')
configure_file(
input: 'producers-dashboard.in',
output: 'local-producers-dashboard',
configuration: local_config
)
meson.add_postconf_script('meson_post_conf.py')
meson.add_install_script('meson_post_install.py')