meson.build 3.13 KB
Newer Older
1
project('pitivi', 'c', version : '1.90.0.1', meson_version : '>= 0.41.0')
Thibault Saunier's avatar
Thibault Saunier committed
2

Thibault Saunier's avatar
Thibault Saunier committed
3 4 5 6
python = find_program('python3')
intltool_merge = find_program('intltool-merge')
itstool = find_program('itstool')
msgfmt = find_program('msgfmt')
Thibault Saunier's avatar
Thibault Saunier committed
7 8

python_dep = dependency('python3', version : '>= 3.3')
9 10 11 12 13 14 15 16 17 18 19 20 21
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'])
Thibault Saunier's avatar
Thibault Saunier committed
22 23 24
cairo_dep = dependency('cairo')
pycairo_dep = dependency('py3cairo')

25 26
gst_transcoder_dep = dependency('gst-transcoder-1.0', version : '>= 1.8.1',
    fallback : ['gst-transcoder', 'gst_transcoder_dep'])
27

28
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
Thibault Saunier's avatar
Thibault Saunier committed
29

30 31 32 33 34 35 36
git = find_program('git', required : false)
if git.found()
    GITVERSION = run_command(git, 'describe', '--always').stdout().strip()
else
    GITVERSION = ''
endif

37 38

geteenvvar = find_program('getenvvar.py')
Thibault Saunier's avatar
Thibault Saunier committed
39
cdata = configuration_data()
40 41 42 43 44 45 46 47 48 49
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())
50 51
cdata.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
cdata.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
Thibault Saunier's avatar
Thibault Saunier committed
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
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')
87
subdir('tests/validate-tests')