configure: Let user know when exit on meson error
[platform/upstream/gstreamer.git] / meson.build
1 project('All GStreamer modules', 'c', version : '1.9.2.1')
2
3 gst_version = '>= @0@'.format(meson.project_version())
4 gst_branch = 'master'
5
6 glib_req = '>= 2.40.0'
7
8 subprojects = [
9     'gstreamer',
10     'gst-plugins-base',
11     'gst-plugins-good',
12     'gst-plugins-ugly',
13     'gst-plugins-bad',
14     'gst-devtools',
15     'gst-editing-services',
16     'gst-python'
17 ]
18
19 # FIXME Remove that check once we have ffmpeg as a gst-libav subproject
20 libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
21 gst_libav = []
22 if libavfilter_dep.found()
23     cc = meson.get_compiler('c')
24     check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
25     #if LIBAVCODEC_VERSION_MICRO >= 100
26     /* FFmpeg uses 100+ as its micro version */
27     #else
28     #error libav provider should be FFmpeg
29     #endif'''
30     if cc.compiles(check_ffmpeg_src, name : 'whether libav is provided by FFmpeg')
31         gst_libav = ['gst-libav']
32     endif
33 endif
34
35 if gst_libav.length() == 0
36     message('WARNING: gst-libav not built as ffmpeg >= n3.1.2 not found on the system')
37 else
38     subprojects += gst_libav
39 endif
40
41
42 foreach subproj: subprojects
43     subproject(subproj, version: gst_version)
44 endforeach
45
46 setenv = find_program('gst-uninstalled.py')
47 run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.current_build_dir()),
48            '--gst-version=@0@'.format(gst_branch)])