forked from GNOME/pitivi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
89 lines (73 loc) · 3.18 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
project('pitivi', 'c', version : '1.90.0.1', meson_version : '>= 0.41.0')
python = find_program('python3')
python_dep = dependency('python3', version : '>= 3.3')
if get_option('build-gst')
subproject('gst-build', default_options: ['enable_python=true',
'disable_gstreamer_sharp=true', 'disable_rtsp_server=true',
'gst-devtools:disable_gtkdoc=true',
'gst-editing-services:disable_gtkdoc=true',
'gst-plugins-base:disable_gtkdoc=true',
'gstreamer:disable_gtkdoc=true',
])
subproject('gst-transcoder')
endif
gst_dep = dependency('gstreamer-1.0', version : '>= 1.14.1',
fallback : ['gstreamer', 'gst_dep'])
cairo_dep = dependency('cairo')
pycairo_dep = dependency('py3cairo')
gst_transcoder_dep = dependency('gst-transcoder-1.0', version : '>= 1.8.1',
fallback : ['gst-transcoder', 'gst_transcoder_dep'])
gnome = import('gnome')
i18n = import('i18n')
podir = join_paths(meson.current_source_dir(), 'po')
itsdir = join_paths(meson.current_source_dir(), 'gettext')
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
git = find_program('git', required : false)
if git.found()
GITVERSION = run_command(git, 'describe', '--always').stdout().strip()
else
GITVERSION = ''
endif
geteenvvar = find_program('getenvvar.py')
cdata = configuration_data()
cdata.set('CONFIGURED_PYTHONPATH',
run_command(geteenvvar, 'PYTHONPATH').stdout().strip())
cdata.set('CONFIGURED_GI_TYPELIB_PATH',
run_command(geteenvvar, 'GI_TYPELIB_PATH').stdout().strip())
cdata.set('CONFIGURED_LD_LIBRARY_PATH',
run_command(geteenvvar, 'LD_LIBRARY_PATH').stdout().strip())
cdata.set('CONFIGURED_GST_PLUGIN_PATH',
run_command(geteenvvar, 'GST_PLUGIN_PATH').stdout().strip())
cdata.set('CONFIGURED_GST_PLUGIN_SYSTEM_PATH',
run_command(geteenvvar, 'GST_PLUGIN_SYSTEM_PATH').stdout().strip())
cdata.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
cdata.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
cdata.set('PACKAGE_NAME', 'Pitivi')
cdata.set('PACKAGE', 'pitivi')
cdata.set('GITVERSION', GITVERSION)
cdata.set('VERSION', meson.project_version())
cdata.set('BUILDDIR', meson.current_build_dir())
coptimizations = shared_library('renderer',
'pitivi/coptimizations/renderer.c',
dependencies: [gst_dep, python_dep, pycairo_dep, cairo_dep],
name_prefix : '',
install: true,
install_dir: get_option('libdir') + '/pitivi/python/pitivi/timeline')
pitivi_install_dir = get_option('libdir') + '/pitivi/python/'
run_command(python, '-m', 'compileall', meson.current_source_dir() + '/pitivi')
install_subdir('pitivi', install_dir: pitivi_install_dir)
configure_file(input: 'pitivi/configure.py.in',
output: 'configure.py',
configuration: cdata)
configure_file = '@0@/configure.py'.format(meson.current_build_dir())
install_data(configure_file, install_dir: pitivi_install_dir + 'pitivi')
# FIXME work around to get testsuite working
run_command('cp', configure_file, meson.current_source_dir() + '/pitivi')
subdir('bin')
subdir('po')
subdir('data')
if not get_option('disable-help')
subdir('help')
endif
subdir('tests')
subdir('tests/validate-tests')