2017-12-06 10:58:23 +00:00
|
|
|
project('All GStreamer modules', 'c',
|
|
|
|
version : '1.13.0.1',
|
2017-12-18 15:54:26 +00:00
|
|
|
meson_version : '>= 0.42.0',
|
2017-12-06 10:58:23 +00:00
|
|
|
default_options : ['buildtype=debugoptimized'])
|
2016-08-24 15:10:21 +00:00
|
|
|
|
2016-09-05 14:54:46 +00:00
|
|
|
gst_version = '>= @0@'.format(meson.project_version())
|
2017-05-04 17:13:26 +00:00
|
|
|
gst_branch = 'master'
|
2016-08-24 15:10:21 +00:00
|
|
|
|
|
|
|
glib_req = '>= 2.40.0'
|
|
|
|
|
|
|
|
subprojects = [
|
|
|
|
'gstreamer',
|
|
|
|
'gst-plugins-base',
|
|
|
|
'gst-plugins-good',
|
|
|
|
]
|
|
|
|
|
2016-11-19 13:16:03 +00:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
if not meson.is_subproject() and cc.get_id() == 'msvc'
|
|
|
|
# Make it possible to use msys2 built zlib
|
|
|
|
# which fails when not using the mingw toolchain as
|
|
|
|
# it uses unistd.h
|
|
|
|
add_global_arguments('-DZ_SOLO', language: 'c')
|
|
|
|
endif
|
|
|
|
|
2016-08-29 14:21:41 +00:00
|
|
|
# FIXME Remove that check once we have ffmpeg as a gst-libav subproject
|
|
|
|
libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
|
|
|
|
gst_libav = []
|
|
|
|
if libavfilter_dep.found()
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
|
|
|
|
#if LIBAVCODEC_VERSION_MICRO >= 100
|
|
|
|
/* FFmpeg uses 100+ as its micro version */
|
|
|
|
#else
|
|
|
|
#error libav provider should be FFmpeg
|
|
|
|
#endif'''
|
2016-11-03 19:42:07 +00:00
|
|
|
if cc.compiles(check_ffmpeg_src, dependencies : libavfilter_dep, name : 'whether libav is provided by FFmpeg')
|
2016-08-29 14:21:41 +00:00
|
|
|
gst_libav = ['gst-libav']
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if gst_libav.length() == 0
|
|
|
|
message('WARNING: gst-libav not built as ffmpeg >= n3.1.2 not found on the system')
|
|
|
|
endif
|
|
|
|
|
2016-10-20 20:35:34 +00:00
|
|
|
if get_option('enable_python')
|
|
|
|
subprojects += ['gst-python']
|
|
|
|
endif
|
2016-08-29 14:21:41 +00:00
|
|
|
|
2016-10-26 20:03:18 +00:00
|
|
|
if not get_option('disable_gst_plugins_ugly')
|
|
|
|
subprojects += ['gst-plugins-ugly']
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not get_option('disable_gst_plugins_bad')
|
|
|
|
subprojects += ['gst-plugins-bad']
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not get_option('disable_gst_libav')
|
2016-10-26 23:05:51 +00:00
|
|
|
subprojects += gst_libav
|
2016-10-26 20:03:18 +00:00
|
|
|
endif
|
|
|
|
|
2017-01-18 05:25:52 +00:00
|
|
|
if not get_option('disable_gst_omx')
|
|
|
|
subprojects += ['gst-omx']
|
|
|
|
endif
|
|
|
|
|
2017-02-09 19:08:39 +00:00
|
|
|
if not get_option('disable_gstreamer_vaapi')
|
2017-11-01 17:32:55 +00:00
|
|
|
if dependency('libva', version: ['>= 0.30.4', '!= 0.99.0'], required : false).found()
|
2017-02-09 19:08:39 +00:00
|
|
|
subprojects += ['gstreamer-vaapi']
|
|
|
|
else
|
|
|
|
message('WARNING: not building gstreamer-vaapi module, missing libva')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-10-26 20:03:18 +00:00
|
|
|
if not get_option('disable_gst_devtools')
|
2016-10-27 19:07:25 +00:00
|
|
|
if dependency('json-glib-1.0', required : false).found()
|
2016-10-26 20:03:18 +00:00
|
|
|
subprojects += ['gst-devtools']
|
2016-10-27 19:07:25 +00:00
|
|
|
else
|
|
|
|
message('WARNING: not building gst-devtools module, missing glib-json-1.0')
|
|
|
|
endif
|
2016-10-26 20:03:18 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if not get_option('disable_gst_editing_services')
|
2017-10-07 14:42:59 +00:00
|
|
|
if dependency('libxml-2.0', required : false).found()
|
2016-10-26 20:03:18 +00:00
|
|
|
subprojects += ['gst-editing-services']
|
2017-08-03 22:45:52 +00:00
|
|
|
else
|
|
|
|
message('WARNING: not building gst-editing-services module, missing libxml-2.0')
|
|
|
|
endif
|
2016-10-26 20:03:18 +00:00
|
|
|
endif
|
|
|
|
|
2016-10-26 23:30:32 +00:00
|
|
|
if not get_option('disable_rtsp_server')
|
|
|
|
subprojects += ['gst-rtsp-server']
|
|
|
|
endif
|
|
|
|
|
2017-08-22 19:29:58 +00:00
|
|
|
if not get_option('disable_gstreamer_sharp')
|
2017-09-06 18:34:27 +00:00
|
|
|
if add_languages('cs', required : false)
|
2017-08-22 19:29:58 +00:00
|
|
|
if meson.version().version_compare('>=0.43')
|
|
|
|
subprojects += ['gstreamer-sharp']
|
|
|
|
else
|
2017-12-13 22:58:20 +00:00
|
|
|
message('WARNING: Not building gstreamer-sharp as meson >=0.43 not found.')
|
2017-08-22 19:29:58 +00:00
|
|
|
endif
|
|
|
|
else
|
2017-12-13 22:58:20 +00:00
|
|
|
message('WARNING: Not building gstreamer-sharp as no CS compiler found.')
|
2017-08-22 19:29:58 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-12-25 22:00:46 +00:00
|
|
|
python3 = import('python3').find_python()
|
2016-10-20 21:12:53 +00:00
|
|
|
symlink = '''
|
|
|
|
import os
|
|
|
|
|
|
|
|
os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
|
|
|
|
os.path.join('@1@', '@0@'))
|
|
|
|
'''
|
2017-03-07 23:31:26 +00:00
|
|
|
|
|
|
|
foreach custom_subproj: get_option('custom_subprojects').split(',')
|
|
|
|
if custom_subproj != ''
|
|
|
|
message ('Adding custom subproject ' + custom_subproj)
|
|
|
|
subprojects += [custom_subproj]
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2017-08-22 19:29:58 +00:00
|
|
|
message('Building subprojects: ' + ', '.join(subprojects))
|
2016-08-24 15:10:21 +00:00
|
|
|
foreach subproj: subprojects
|
2017-04-10 20:36:30 +00:00
|
|
|
default_options = []
|
|
|
|
if get_option('disable_introspection')
|
|
|
|
default_options += ['disable_introspection=true']
|
|
|
|
endif
|
|
|
|
subproject(subproj, version: gst_version, default_options: default_options)
|
2016-10-20 21:12:53 +00:00
|
|
|
|
|
|
|
cmdres = run_command(python3, '-c', symlink.format(subproj, meson.current_source_dir()))
|
|
|
|
if cmdres.returncode() == 0
|
|
|
|
message('Created symlink to ' + subproj)
|
|
|
|
else
|
|
|
|
message('Could not create symlink to @0@'.format(subproj))
|
|
|
|
endif
|
2016-08-24 15:10:21 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
setenv = find_program('gst-uninstalled.py')
|
2017-04-05 22:25:31 +00:00
|
|
|
run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.build_root()),
|
|
|
|
'--srcdir=@0@'.format(meson.source_root()),
|
2016-09-14 13:36:28 +00:00
|
|
|
'--gst-version=@0@'.format(gst_branch)])
|
2016-11-07 21:17:39 +00:00
|
|
|
|
|
|
|
update = find_program('git-update')
|
|
|
|
run_target('git-update', command : [update])
|
|
|
|
run_target('update', command : [update,
|
|
|
|
'--builddir=@0@'.format(meson.current_build_dir())])
|