1 project('All GStreamer modules', 'c',
3 meson_version : '>= 0.48.0',
4 default_options : ['buildtype=debugoptimized'])
6 gst_version = '>= @0@'.format(meson.project_version())
11 build_system = build_machine.system()
12 cc = meson.get_compiler('c')
14 # Make it possible to use msys2 built zlib which fails
15 # when not using the mingw toolchain as it uses unistd.h
16 if not meson.is_subproject() and cc.get_id() == 'msvc'
17 uname = find_program('uname', required: false)
19 ret = run_command(uname, '-o')
20 if ret.returncode() == 0 and ret.stdout().to_lower() == 'msys'
21 ret = run_command(uname, '-r')
22 # The kernel version returned by uname is actually the msys version
23 if ret.returncode() == 0 and ret.stdout().startswith('2')
24 # If a system zlib is found, disable UNIX features in zlib.h and zconf.h
25 if cc.find_library('z').found()
26 add_global_arguments('-DZ_SOLO', language: 'c')
33 # Ordered list of subprojects (dict has no ordering guarantees)
36 ['gst-plugins-base', {}],
37 ['gst-plugins-good', {}],
38 ['libnice', { 'option': get_option('libnice'), 'match_gst_version': false}],
39 ['gst-plugins-bad', { 'option': get_option('bad') }],
40 ['gst-plugins-ugly', { 'option': get_option('ugly') }],
41 ['gst-libav', { 'option': get_option('libav') }],
42 ['gst-rtsp-server', { 'option': get_option('rtsp_server') }],
43 ['gst-devtools', { 'option': get_option('devtools')}],
44 ['gst-integration-testsuites', { 'option': get_option('devtools') }],
45 ['gst-editing-services', { 'option': get_option('ges') }],
46 ['gstreamer-vaapi', { 'option': get_option('vaapi') }],
47 ['gst-omx', { 'option': get_option('omx'), }],
48 ['gstreamer-sharp', { 'option': get_option('sharp') }],
49 ['pygobject', { 'option': get_option('python'), 'match_gst_version': false }],
50 ['gst-python', { 'option': get_option('python') }],
53 python3 = import('python').find_installation()
57 os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
58 os.path.join('@1@', '@0@'))
61 if build_system == 'windows'
62 subproject('win-flex-bison-binaries')
63 subproject('win-nasm')
66 subproject('orc', required: get_option('orc'))
68 subprojects_names = []
69 foreach sp : subprojects
72 is_required = build_infos.get('option', true)
73 match_gst_version = build_infos.get('match_gst_version', true)
76 subproj = subproject(project_name, version: gst_version, required: is_required)
78 subproj = subproject(project_name, required: is_required)
82 subprojects_names += [project_name]
83 cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir()))
84 if cmdres.returncode() == 0
85 message('Created symlink to ' + project_name)
90 foreach custom_subproj: get_option('custom_subprojects').split(',')
91 if custom_subproj != ''
92 message ('Adding custom subproject ' + custom_subproj)
93 subproject(custom_subproj)
94 subprojects_names += [custom_subproj]
98 message('Building subprojects: ' + ', '.join(subprojects_names))
100 setenv = find_program('gst-uninstalled.py')
101 run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.build_root()),
102 '--srcdir=@0@'.format(meson.source_root())])
104 update = find_program('git-update')
105 run_target('git-update', command : [update])
106 run_target('update', command : [update,
107 '--builddir=@0@'.format(meson.current_build_dir())])