1 project('All GStreamer modules', 'c', version : '1.13.0.1', meson_version : '>= 0.40.1')
3 gst_version = '>= @0@'.format(meson.project_version())
14 cc = meson.get_compiler('c')
15 if not meson.is_subproject() and cc.get_id() == 'msvc'
16 # Make it possible to use msys2 built zlib
17 # which fails when not using the mingw toolchain as
19 add_global_arguments('-DZ_SOLO', language: 'c')
22 # FIXME Remove that check once we have ffmpeg as a gst-libav subproject
23 libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
25 if libavfilter_dep.found()
26 cc = meson.get_compiler('c')
27 check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
28 #if LIBAVCODEC_VERSION_MICRO >= 100
29 /* FFmpeg uses 100+ as its micro version */
31 #error libav provider should be FFmpeg
33 if cc.compiles(check_ffmpeg_src, dependencies : libavfilter_dep, name : 'whether libav is provided by FFmpeg')
34 gst_libav = ['gst-libav']
38 if gst_libav.length() == 0
39 message('WARNING: gst-libav not built as ffmpeg >= n3.1.2 not found on the system')
42 if get_option('enable_python')
43 subprojects += ['gst-python']
46 if not get_option('disable_gst_plugins_ugly')
47 subprojects += ['gst-plugins-ugly']
50 if not get_option('disable_gst_plugins_bad')
51 subprojects += ['gst-plugins-bad']
54 if not get_option('disable_gst_libav')
55 subprojects += gst_libav
58 if not get_option('disable_gst_omx')
59 subprojects += ['gst-omx']
62 if not get_option('disable_gstreamer_vaapi')
63 if dependency('libva', version: ['>= 0.30.4', '!= 0.99.0'], required : false).found()
64 subprojects += ['gstreamer-vaapi']
66 message('WARNING: not building gstreamer-vaapi module, missing libva')
70 if not get_option('disable_gst_devtools')
71 if dependency('json-glib-1.0', required : false).found()
72 subprojects += ['gst-devtools']
74 message('WARNING: not building gst-devtools module, missing glib-json-1.0')
78 if not get_option('disable_gst_editing_services')
79 if dependency('libxml-2.0', required : false).found()
80 subprojects += ['gst-editing-services']
82 message('WARNING: not building gst-editing-services module, missing libxml-2.0')
86 if not get_option('disable_rtsp_server')
87 subprojects += ['gst-rtsp-server']
90 if not get_option('disable_gstreamer_sharp')
91 if add_languages('cs', required : false)
92 if meson.version().version_compare('>=0.43')
93 subprojects += ['gstreamer-sharp']
95 message('WARNING: Not building gstramer-sharp as meson >=0.43 not found.')
98 message('WARNING: Not building gstramer-sharp as no CS compiler found.')
102 python3 = find_program('python3')
106 os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
107 os.path.join('@1@', '@0@'))
110 foreach custom_subproj: get_option('custom_subprojects').split(',')
111 if custom_subproj != ''
112 message ('Adding custom subproject ' + custom_subproj)
113 subprojects += [custom_subproj]
117 message('Building subprojects: ' + ', '.join(subprojects))
118 foreach subproj: subprojects
120 if get_option('disable_introspection')
121 default_options += ['disable_introspection=true']
123 subproject(subproj, version: gst_version, default_options: default_options)
125 cmdres = run_command(python3, '-c', symlink.format(subproj, meson.current_source_dir()))
126 if cmdres.returncode() == 0
127 message('Created symlink to ' + subproj)
129 message('Could not create symlink to @0@'.format(subproj))
133 setenv = find_program('gst-uninstalled.py')
134 run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.build_root()),
135 '--srcdir=@0@'.format(meson.source_root()),
136 '--gst-version=@0@'.format(gst_branch)])
138 update = find_program('git-update')
139 run_target('git-update', command : [update])
140 run_target('update', command : [update,
141 '--builddir=@0@'.format(meson.current_build_dir())])