gstreamer/meson.build

87 lines
2.4 KiB
Meson
Raw Normal View History

2016-10-26 23:02:22 +00:00
project('All GStreamer modules', 'c', version : '1.9.90', meson_version : '>= 0.35.1')
2016-08-24 15:10:21 +00:00
2016-09-05 14:54:46 +00:00
gst_version = '>= @0@'.format(meson.project_version())
2016-08-24 15:10:21 +00:00
gst_branch = 'master'
glib_req = '>= 2.40.0'
subprojects = [
'gstreamer',
'gst-plugins-base',
'gst-plugins-good',
]
# 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'''
if cc.compiles(check_ffmpeg_src, dependencies : libavfilter_dep, name : 'whether libav is provided by FFmpeg')
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-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')
subprojects += gst_libav
2016-10-26 20:03:18 +00:00
endif
if not get_option('disable_gst_devtools')
if dependency('json-glib-1.0', required : false).found()
2016-10-26 20:03:18 +00:00
subprojects += ['gst-devtools']
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')
subprojects += ['gst-editing-services']
endif
2016-10-26 23:30:32 +00:00
if not get_option('disable_rtsp_server')
subprojects += ['gst-rtsp-server']
endif
2016-10-20 21:12:53 +00:00
python3 = find_program('python3')
symlink = '''
import os
os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
os.path.join('@1@', '@0@'))
'''
2016-08-24 15:10:21 +00:00
foreach subproj: subprojects
subproject(subproj, version: gst_version)
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')
2016-09-14 13:36:28 +00:00
run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.current_build_dir()),
'--gst-version=@0@'.format(gst_branch)])