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 documented_projects = ''
15 # Make it possible to use msys2 built zlib which fails
16 # when not using the mingw toolchain as it uses unistd.h
17 if not meson.is_subproject() and cc.get_id() == 'msvc'
18 uname = find_program('uname', required: false)
20 ret = run_command(uname, '-o')
21 if ret.returncode() == 0 and ret.stdout().to_lower() == 'msys'
22 ret = run_command(uname, '-r')
23 # The kernel version returned by uname is actually the msys version
24 if ret.returncode() == 0 and ret.stdout().startswith('2')
25 # If a system zlib is found, disable UNIX features in zlib.h and zconf.h
26 if cc.find_library('z').found()
27 add_global_arguments('-DZ_SOLO', language: 'c')
34 # Ordered list of subprojects (dict has no ordering guarantees)
36 ['gstreamer', {'build-hotdoc': true}],
37 ['gst-plugins-base', {'build-hotdoc': true}],
38 ['gst-plugins-good', {'build-hotdoc': true}],
39 ['libnice', { 'option': get_option('libnice'), 'match_gst_version': false}],
40 ['gst-plugins-bad', { 'option': get_option('bad'), 'build-hotdoc': true }],
41 ['gst-plugins-ugly', { 'option': get_option('ugly'), 'build-hotdoc': true }],
42 ['gst-libav', { 'option': get_option('libav'), 'build-hotdoc': true }],
43 ['gst-rtsp-server', { 'option': get_option('rtsp_server'), 'build-hotdoc': true }],
44 ['gst-devtools', { 'option': get_option('devtools'), 'build-hotdoc': true }],
45 ['gst-integration-testsuites', { 'option': get_option('devtools') }],
46 ['gst-editing-services', { 'option': get_option('ges'), 'build-hotdoc': true }],
47 ['gstreamer-vaapi', { 'option': get_option('vaapi'), 'build-hotdoc': true }],
48 ['gst-omx', { 'option': get_option('omx'), 'build-hotdoc': true, }],
49 ['gstreamer-sharp', { 'option': get_option('sharp') }],
50 ['pygobject', { 'option': get_option('python'), 'match_gst_version': false }],
51 ['gst-python', { 'option': get_option('python') }],
54 python3 = import('python').find_installation()
58 os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
59 os.path.join('@1@', '@0@'))
62 if build_system == 'windows'
63 subproject('win-flex-bison-binaries')
64 subproject('win-nasm')
67 subproject('orc', required: get_option('orc'))
69 subprojects_names = []
71 foreach sp : subprojects
74 is_required = build_infos.get('option', true)
75 match_gst_version = build_infos.get('match_gst_version', true)
78 subproj = subproject(project_name, version: gst_version, required: is_required)
80 subproj = subproject(project_name, required: is_required)
84 if build_infos.has_key('build-hotdoc', default: false)
85 foreach plugin: subproj.get_variable('plugins')
86 all_plugins += plugin.full_path()
88 if documented_projects != ''
89 documented_projects += ','
92 documented_projects += project_name
94 documented_projects += project_name
96 subprojects_names += [project_name]
97 cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir()))
98 if cmdres.returncode() == 0
99 message('Created symlink to ' + project_name)
104 foreach custom_subproj: get_option('custom_subprojects').split(',')
105 if custom_subproj != ''
106 message ('Adding custom subproject ' + custom_subproj)
107 subproject(custom_subproj)
108 subprojects_names += [custom_subproj]
112 if build_machine.system() == 'windows'
113 message('Disabling hotdoc while building on Windows')
115 hotdoc_p = find_program('hotdoc', required : get_option('doc'))
117 if documented_projects != ''
118 subproject('gst-docs', default_options: 'built_subprojects=' + documented_projects)
119 message('Gst docs subprojects: ' + documented_projects)
122 message('Not building documentation as hotdoc was not found')
126 message('Building subprojects: ' + ', '.join(subprojects_names))
127 setenv = find_program('gst-uninstalled.py')
128 run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.build_root()),
129 '--srcdir=@0@'.format(meson.source_root())])
131 update = find_program('git-update')
132 run_target('git-update', command : [update])
133 run_target('update', command : [update,
134 '--builddir=@0@'.format(meson.current_build_dir())])