meson.build 3.18 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
python = find_program('python3')
Thibault Saunier's avatar
Thibault Saunier committed
4 5

python_dep = dependency('python3', version : '>= 3.3')
6 7 8 9 10 11 12 13 14 15 16 17 18
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
19 20 21
cairo_dep = dependency('cairo')
pycairo_dep = dependency('py3cairo')

22 23
gst_transcoder_dep = dependency('gst-transcoder-1.0', version : '>= 1.8.1',
    fallback : ['gst-transcoder', 'gst_transcoder_dep'])
24

25 26 27 28 29
gnome = import('gnome')
i18n = import('i18n')

podir = join_paths(meson.current_source_dir(), 'po')
itsdir = join_paths(meson.current_source_dir(), 'gettext')
30
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
Thibault Saunier's avatar
Thibault Saunier committed
31

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

39 40

geteenvvar = find_program('getenvvar.py')
Thibault Saunier's avatar
Thibault Saunier committed
41
cdata = configuration_data()
42 43 44 45 46 47 48 49 50 51
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())
52 53
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
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
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')
89
subdir('tests/validate-tests')