Commit 8f807477 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜

meson: Add feature options for all plugins

Checks for GL, Qt5, and C++ are still automagic. FIXMEs have been
added for these so they can be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
parent f2c2560d
# Very much not going to implement all kinds of logic around aalib-config # Very much not going to implement all kinds of logic around aalib-config
# or cater for non-standard prefixes.
if cc.has_header('aalib.h') have_aalib = false
libaa_dep = cc.find_library('aa', required : false)
# TODO: https://github.com/mesonbuild/meson/issues/3940
aalib_option = get_option('aalib')
if not aalib_option.disabled()
have_aalib = cc.has_header('aalib.h')
if not have_aalib and aalib_option.enabled()
error('aalib plugin enabled, but aalib.h not found')
endif
endif
if have_aalib
libaa_dep = cc.find_library('aa', required : aalib_option)
if libaa_dep.found() if libaa_dep.found()
library('gstaasink', 'gstaasink.c', library('gstaasink', 'gstaasink.c',
c_args : gst_plugins_good_args, c_args : gst_plugins_good_args,
......
cairo_dep = dependency('cairo-gobject', version : '>=1.10.0', required : false) cairo_dep = dependency('cairo-gobject', version : '>=1.10.0', required : get_option('cairo'))
if cairo_dep.found() if cairo_dep.found()
gstcairo = library('gstcairo', gstcairo = library('gstcairo',
......
...@@ -6,7 +6,7 @@ dv_sources = [ ...@@ -6,7 +6,7 @@ dv_sources = [
'smpte_test.c', 'smpte_test.c',
] ]
dv_dep = dependency('libdv', version : '>= 0.100', required : false) dv_dep = dependency('libdv', version : '>= 0.100', required : get_option('dv'))
if dv_dep.found() if dv_dep.found()
gstdv = library('gstdv', gstdv = library('gstdv',
...@@ -19,6 +19,7 @@ if dv_dep.found() ...@@ -19,6 +19,7 @@ if dv_dep.found()
) )
pkgconfig.generate(gstdv, install_dir : plugins_pkgconfig_install_dir) pkgconfig.generate(gstdv, install_dir : plugins_pkgconfig_install_dir)
# FIXME
#executable('smpte_test', #executable('smpte_test',
# 'smpte_test.c', 'gstsmptetimecode.c', # 'smpte_test.c', 'gstsmptetimecode.c',
# dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, gstvideo_dep, dv_dep], # dependencies : [gstbase_dep, gsttag_dep, gstaudio_dep, gstvideo_dep, dv_dep],
......
...@@ -5,7 +5,7 @@ flac_sources = [ ...@@ -5,7 +5,7 @@ flac_sources = [
'gstflactag.c', 'gstflactag.c',
] ]
flac_dep = dependency('flac', version : '>=1.1.4', required : false) flac_dep = dependency('flac', version : '>=1.1.4', required : get_option('flac'))
if flac_dep.found() if flac_dep.found()
gstflac = library('gstflac', gstflac = library('gstflac',
......
...@@ -5,7 +5,7 @@ pixbuf_sources = [ ...@@ -5,7 +5,7 @@ pixbuf_sources = [
'gstgdkpixbufsink.c', 'gstgdkpixbufsink.c',
] ]
gdkpixbuf_dep = dependency('gdk-pixbuf-2.0', version : '>=2.8.0', required : false) gdkpixbuf_dep = dependency('gdk-pixbuf-2.0', version : '>=2.8.0', required : get_option('gdk-pixbuf'))
if gdkpixbuf_dep.found() if gdkpixbuf_dep.found()
gstgdkpixbuf = library('gstgdkpixbuf', gstgdkpixbuf = library('gstgdkpixbuf',
......
...@@ -10,12 +10,13 @@ gtk_sources = [ ...@@ -10,12 +10,13 @@ gtk_sources = [
gtk_defines = [] gtk_defines = []
optional_deps = [] optional_deps = []
gtk_dep = dependency('gtk+-3.0', required : false) gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3'))
if gtk_dep.found() if gtk_dep.found()
if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0') if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0')
have_gtk3_gl_windowing = false have_gtk3_gl_windowing = false
if gst_gl_have_window_x11 and gst_gl_have_platform_glx if gst_gl_have_window_x11 and gst_gl_have_platform_glx
# FIXME: automagic
gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) gtk_x11_dep = dependency('gtk+-x11-3.0', required : false)
if gtk_x11_dep.found() if gtk_x11_dep.found()
optional_deps += gtk_x11_dep optional_deps += gtk_x11_dep
...@@ -24,6 +25,7 @@ if gtk_dep.found() ...@@ -24,6 +25,7 @@ if gtk_dep.found()
endif endif
if gst_gl_have_window_wayland and gst_gl_have_platform_egl if gst_gl_have_window_wayland and gst_gl_have_platform_egl
# FIXME: automagic
gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false)
if gtk_wayland_dep.found() if gtk_wayland_dep.found()
optional_deps += gtk_wayland_dep optional_deps += gtk_wayland_dep
......
...@@ -6,7 +6,7 @@ jack_sources = [ ...@@ -6,7 +6,7 @@ jack_sources = [
'gstjackutil.c', 'gstjackutil.c',
] ]
libjack_dep = dependency('jack', version : '>= 1.9.7', required : false) libjack_dep = dependency('jack', version : '>= 1.9.7', required : get_option('jack'))
if libjack_dep.found() if libjack_dep.found()
gstjack = library('gstjack', gstjack = library('gstjack',
......
...@@ -4,7 +4,7 @@ jpeg_sources = [ ...@@ -4,7 +4,7 @@ jpeg_sources = [
'gstjpegdec.c', 'gstjpegdec.c',
] ]
jpeglib = cc.find_library('jpeg', required : false) jpeglib = cc.find_library('jpeg', required : get_option('jpeg'))
if jpeglib.found() if jpeglib.found()
gstjpeg = library('gstjpeg', gstjpeg = library('gstjpeg',
......
lame_dep = cc.find_library('mp3lame', required : false) lame_option = get_option('lame')
lame_dep = cc.find_library('mp3lame', required : lame_option)
have_lame = lame_dep.found()
if lame_dep.found() and cc.has_header_symbol('lame/lame.h', 'lame_init') # TODO: https://github.com/mesonbuild/meson/issues/3940
if have_lame
have_lame = cc.has_header_symbol('lame/lame.h', 'lame_init')
if not have_lame and lame_option.enabled()
error('Found libmp3lame but lame.h was not usable')
endif
endif
if have_lame
lame_extra_c_args = [] lame_extra_c_args = []
if cc.has_header_symbol('lame/lame.h', 'lame_set_VBR_quality') if cc.has_header_symbol('lame/lame.h', 'lame_set_VBR_quality')
lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY'] lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY']
......
libcaca_dep = dependency('caca', required : false) libcaca_dep = dependency('caca', required : get_option('caca'))
if libcaca_dep.found() if libcaca_dep.found()
library('gstcacasink', 'gstcacasink.c', library('gstcacasink', 'gstcacasink.c',
......
...@@ -4,7 +4,7 @@ png_sources = [ ...@@ -4,7 +4,7 @@ png_sources = [
'gstpngdec.c', 'gstpngdec.c',
] ]
libpng_dep = dependency('libpng', version : '>=1.2', required : false) libpng_dep = dependency('libpng', version : '>=1.2', required : get_option('png'))
if libpng_dep.found() if libpng_dep.found()
gstpng = library('gstpng', gstpng = library('gstpng',
......
mpg123_dep = dependency('libmpg123', version : '>= 1.3', required : false) mpg123_dep = dependency('libmpg123', version : '>= 1.3', required : get_option('mpg123'))
if mpg123_dep.found() if mpg123_dep.found()
gstmpg123 = library('gstmpg123', gstmpg123 = library('gstmpg123',
......
...@@ -6,7 +6,7 @@ pulse_sources = [ ...@@ -6,7 +6,7 @@ pulse_sources = [
'pulseutil.c', 'pulseutil.c',
] ]
libpulse_dep = dependency('libpulse', version : '>=2.0', required : false) libpulse_dep = dependency('libpulse', version : '>=2.0', required : get_option('pulse'))
if libpulse_dep.found() if libpulse_dep.found()
gstpulse = library('gstpulseaudio', gstpulse = library('gstpulseaudio',
......
...@@ -14,12 +14,14 @@ moc_headers = [ ...@@ -14,12 +14,14 @@ moc_headers = [
'gstqsgtexture.h', 'gstqsgtexture.h',
] ]
# FIXME: -Dqt5=enabled is silently ignored if a c++ compiler is not found
if have_cxx and build_gstgl if have_cxx and build_gstgl
qt5_mod = import('qt5') qt5_mod = import('qt5')
qt5qml_dep = dependency('qt5', modules : ['Core', 'Gui', 'Qml', 'Quick'], required: false) qt5qml_dep = dependency('qt5', modules : ['Core', 'Gui', 'Qml', 'Quick'],
required: get_option('qt5'))
# FIXME Add a way to get that information out of the qt5 module # FIXME Add a way to get that information out of the qt5 module
moc = find_program('moc-qt5', 'moc', required : false) moc = find_program('moc-qt5', 'moc', required : get_option('qt5'))
if qt5qml_dep.found() and moc.found() if qt5qml_dep.found() and moc.found()
optional_deps = [] optional_deps = []
qt_defines = [] qt_defines = []
...@@ -30,6 +32,7 @@ if have_cxx and build_gstgl ...@@ -30,6 +32,7 @@ if have_cxx and build_gstgl
# This semi-matches what meson does internally with the qt5 module # This semi-matches what meson does internally with the qt5 module
# FIXME Add a way to get some of this information out of the qt5 module # FIXME Add a way to get some of this information out of the qt5 module
if not have_qpa_include if not have_qpa_include
# FIXME: automagic
qt5core_dep = dependency('Qt5Core', required: false) qt5core_dep = dependency('Qt5Core', required: false)
if qt5core_dep.found() and qt5core_dep.type_name() == 'pkgconfig' if qt5core_dep.found() and qt5core_dep.type_name() == 'pkgconfig'
qt_version = qt5core_dep.version() qt_version = qt5core_dep.version()
...@@ -64,6 +67,7 @@ if have_cxx and build_gstgl ...@@ -64,6 +67,7 @@ if have_cxx and build_gstgl
# Try to come up with all the platform/winsys combinations that will work # Try to come up with all the platform/winsys combinations that will work
if gst_gl_have_window_x11 and gst_gl_have_platform_glx if gst_gl_have_window_x11 and gst_gl_have_platform_glx
# FIXME: automagic
qt5x11extras = dependency('qt5', modules : ['X11Extras'], required : false) qt5x11extras = dependency('qt5', modules : ['X11Extras'], required : false)
if qt5x11extras.found() if qt5x11extras.found()
optional_deps += qt5x11extras optional_deps += qt5x11extras
...@@ -75,6 +79,7 @@ if have_cxx and build_gstgl ...@@ -75,6 +79,7 @@ if have_cxx and build_gstgl
if gst_gl_have_platform_egl if gst_gl_have_platform_egl
if have_qpa_include if have_qpa_include
if gst_gl_have_window_wayland if gst_gl_have_window_wayland
# FIXME: automagic
qt5waylandextras = dependency('qt5', modules : ['WaylandClient'], required : false) qt5waylandextras = dependency('qt5', modules : ['WaylandClient'], required : false)
if qt5waylandextras.found() if qt5waylandextras.found()
optional_deps += qt5waylandextras optional_deps += qt5waylandextras
...@@ -83,6 +88,7 @@ if have_cxx and build_gstgl ...@@ -83,6 +88,7 @@ if have_cxx and build_gstgl
endif endif
endif endif
if gst_gl_have_window_android if gst_gl_have_window_android
# FIXME: automagic
# FIXME: untested # FIXME: untested
qt5androidextras = dependency('qt5', modules : ['AndroidExtras'], required : false) qt5androidextras = dependency('qt5', modules : ['AndroidExtras'], required : false)
if qt5androidextras.found() if qt5androidextras.found()
...@@ -98,6 +104,7 @@ if have_cxx and build_gstgl ...@@ -98,6 +104,7 @@ if have_cxx and build_gstgl
if gst_gl_have_platform_wgl and gst_gl_have_window_win32 if gst_gl_have_platform_wgl and gst_gl_have_window_win32
# for wglMakeCurrent() # for wglMakeCurrent()
# FIXME: automagic
opengl32_dep = cc.find_library('opengl32', required : false) opengl32_dep = cc.find_library('opengl32', required : false)
if opengl32_dep.found() if opengl32_dep.found()
qt_defines += ['-DHAVE_QT_WIN32'] qt_defines += ['-DHAVE_QT_WIN32']
......
raw1394_dep = dependency('libraw1394', version: '>= 2.0.0', required: false) raw1394_dep = dependency('libraw1394', version: '>= 2.0.0', required: get_option('dv1394'))
avc1394_dep = dependency('libavc1394', version: '>= 0.5.4', required: false) avc1394_dep = dependency('libavc1394', version: '>= 0.5.4', required: get_option('dv1394'))
iec61883_dep = dependency('libiec61883', version: '>= 1.0.0', required: false) iec61883_dep = dependency('libiec61883', version: '>= 1.0.0', required: get_option('dv1394'))
have_1394 = false have_1394 = false
if raw1394_dep.found() and iec61883_dep.found() and avc1394_dep.found() if raw1394_dep.found() and iec61883_dep.found() and avc1394_dep.found()
......
shout2_sources = ['gstshout2.c'] shout2_sources = ['gstshout2.c']
shout2_dep = dependency('shout', version : '>= 2.0', required : false) shout2_dep = dependency('shout', version : '>= 2.0', required : get_option('shout2'))
if shout2_dep.found() if shout2_dep.found()
gstshout2 = library('gstshout2', gstshout2 = library('gstshout2',
......
...@@ -10,7 +10,7 @@ soup_args = [ ...@@ -10,7 +10,7 @@ soup_args = [
'-DSOUP_VERSION_MAX_ALLOWED=SOUP_DEPRECATED_IN_2_48', '-DSOUP_VERSION_MAX_ALLOWED=SOUP_DEPRECATED_IN_2_48',
] ]
libsoup_dep = dependency('libsoup-2.4', version : '>=2.48', required : false) libsoup_dep = dependency('libsoup-2.4', version : '>=2.48', required : get_option('soup'))
if libsoup_dep.found() if libsoup_dep.found()
gstsouphttpsrc = library('gstsoup', gstsouphttpsrc = library('gstsoup',
......
...@@ -4,7 +4,7 @@ speex_sources = [ ...@@ -4,7 +4,7 @@ speex_sources = [
'gstspeexenc.c', 'gstspeexenc.c',
] ]
speex_dep = dependency('speex', version : '>=1.1.6', required : false) speex_dep = dependency('speex', version : '>=1.1.6', required : get_option('speex'))
if speex_dep.found() if speex_dep.found()
gstspeex = library('gstspeex', gstspeex = library('gstspeex',
......
...@@ -4,9 +4,9 @@ taglib_sources = [ ...@@ -4,9 +4,9 @@ taglib_sources = [
'gsttaglibplugin.c', 'gsttaglibplugin.c',
] ]
taglib_dep = dependency('taglib', version : '>= 1.5', required : false) taglib_dep = dependency('taglib', version : '>= 1.5', required : get_option('taglib'))
if taglib_dep.found() and add_languages('cpp', required : false) if taglib_dep.found() and add_languages('cpp')
extra_args = [] extra_args = []
cxx = meson.get_compiler('cpp') cxx = meson.get_compiler('cpp')
if cxx.has_argument('-fvisibility=hidden') if cxx.has_argument('-fvisibility=hidden')
......
twolame_dep = dependency('twolame', version : '>= 0.3.10', required : false) twolame_dep = dependency('twolame', version : '>= 0.3.10', required : get_option('twolame'))
if twolame_dep.found() if twolame_dep.found()
twolame = library('gsttwolame', twolame = library('gsttwolame',
......
...@@ -16,7 +16,7 @@ vpx_features = [ ...@@ -16,7 +16,7 @@ vpx_features = [
[ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ], [ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ],
] ]
vpx_dep = dependency('vpx', version : '>=1.3.0', required : false) vpx_dep = dependency('vpx', version : '>=1.3.0', required : get_option('vpx'))
if vpx_dep.found() if vpx_dep.found()
vpx_args = [] vpx_args = []
...@@ -29,8 +29,7 @@ if vpx_dep.found() ...@@ -29,8 +29,7 @@ if vpx_dep.found()
const vpx_codec_iface_t *c = &@1@; const vpx_codec_iface_t *c = &@1@;
return c != 0; return c != 0;
}'''.format(header,codec_iface) }'''.format(header,codec_iface)
# FIXME: should take dependencies : vpx_dep argument if cc.links(link_code, dependencies : vpx_dep)
if cc.links(link_code, args : ['-lvpx'])
vpx_args += extra_define vpx_args += extra_define
message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1))) message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = true have_vpx_feature = true
......
...@@ -6,7 +6,7 @@ wavpack_sources = [ ...@@ -6,7 +6,7 @@ wavpack_sources = [
'gstwavpackstreamreader.c', 'gstwavpackstreamreader.c',
] ]
wavpack_dep = dependency('wavpack', version : '>= 4.60.0', required : false) wavpack_dep = dependency('wavpack', version : '>= 4.60.0', required : get_option('wavpack'))
if wavpack_dep.found() if wavpack_dep.found()
gstwavpack = library('gstwavpack', gstwavpack = library('gstwavpack',
......
...@@ -11,6 +11,9 @@ matroska_sources = [ ...@@ -11,6 +11,9 @@ matroska_sources = [
'lzo.c', 'lzo.c',
] ]
bz2_dep = cc.find_library('bz2', required : get_option('bz2'))
cdata.set('HAVE_BZ2', bz2_dep.found())
gstmatroska = library('gstmatroska', gstmatroska = library('gstmatroska',
matroska_sources, matroska_sources,
c_args : gst_plugins_good_args, c_args : gst_plugins_good_args,
...@@ -18,7 +21,7 @@ gstmatroska = library('gstmatroska', ...@@ -18,7 +21,7 @@ gstmatroska = library('gstmatroska',
include_directories : [configinc], include_directories : [configinc],
dependencies : [gstpbutils_dep, gstaudio_dep, gstriff_dep, dependencies : [gstpbutils_dep, gstaudio_dep, gstriff_dep,
gstvideo_dep, gsttag_dep, gstbase_dep, gstvideo_dep, gsttag_dep, gstbase_dep,
gst_dep, zlib_dep, bz2lib, libm], gst_dep, zlib_dep, bz2_dep, libm],
install : true, install : true,
install_dir : plugins_install_dir, install_dir : plugins_install_dir,
) )
......
subdir('alpha') foreach plugin : ['alpha', 'apetag', 'audiofx', 'audioparsers', 'auparse',
subdir('apetag') 'autodetect', 'avi', 'cutter', 'debugutils', 'deinterlace',
subdir('audiofx') 'dtmf', 'effectv', 'equalizer', 'flv', 'flx', 'goom',
subdir('audioparsers') 'goom2k1', 'icydemux', 'id3demux', 'imagefreeze',
subdir('auparse') 'interleave', 'isomp4', 'law', 'level', 'matroska',
subdir('autodetect') 'monoscope', 'multifile', 'multipart', 'replaygain', 'rtp',
subdir('avi') 'rtpmanager', 'rtsp', 'shapewipe', 'smpte', 'spectrum',
subdir('cutter') 'udp', 'videobox', 'videocrop', 'videofilter', 'videomixer',
subdir('debugutils') 'wavenc', 'wavparse', 'y4m']
subdir('deinterlace') if not get_option(plugin).disabled()
subdir('dtmf') subdir(plugin)
subdir('effectv') endif
subdir('equalizer') endforeach
subdir('flv')
subdir('flx')
subdir('goom')
subdir('goom2k1')
subdir('icydemux')
subdir('id3demux')
subdir('imagefreeze')
subdir('interleave')
subdir('isomp4')
subdir('law')
subdir('level')
subdir('matroska')
subdir('monoscope')
subdir('multifile')
subdir('multipart')
subdir('replaygain')
subdir('rtp')
subdir('rtpmanager')
subdir('rtsp')
subdir('shapewipe')
subdir('smpte')
subdir('spectrum')
subdir('udp')
subdir('videobox')
subdir('videocrop')
subdir('videofilter')
subdir('videomixer')
subdir('wavenc')
subdir('wavparse')
subdir('y4m')
project('gst-plugins-good', 'c', project('gst-plugins-good', 'c',
version : '1.15.0.1', version : '1.15.0.1',
meson_version : '>= 0.46.0', meson_version : '>= 0.47',
default_options : [ 'warning_level=1', default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ]) 'buildtype=debugoptimized' ])
...@@ -15,9 +15,11 @@ else ...@@ -15,9 +15,11 @@ else
gst_version_nano = 0 gst_version_nano = 0
endif endif
# FIXME: automagic
have_cxx = add_languages('cpp', required : false) have_cxx = add_languages('cpp', required : false)
glib_req = '>= 2.40.0' glib_req = '>= 2.40.0'
orc_req = '>= 0.4.17'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
api_version = '1.0' api_version = '1.0'
...@@ -25,6 +27,7 @@ api_version = '1.0' ...@@ -25,6 +27,7 @@ api_version = '1.0'
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir')) plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
host_system = host_machine.system()
if cc.get_id() == 'msvc' if cc.get_id() == 'msvc'
# Ignore several spurious warnings for things gstreamer does very commonly # Ignore several spurious warnings for things gstreamer does very commonly
...@@ -149,9 +152,6 @@ cdata.set_quoted('GST_LICENSE', 'LGPL') ...@@ -149,9 +152,6 @@ cdata.set_quoted('GST_LICENSE', 'LGPL')
cdata.set_quoted('PACKAGE', 'gst-plugins-good') cdata.set_quoted('PACKAGE', 'gst-plugins-good')
cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-good-1.0') cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-good-1.0')
cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
if get_option('nls')
cdata.set('ENABLE_NLS', 1)
endif
warning_flags = [ warning_flags = [
'-Wmissing-declarations', '-Wmissing-declarations',
...@@ -211,7 +211,7 @@ gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req, ...@@ -211,7 +211,7 @@ gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_base_dep']) fallback : ['gstreamer', 'gst_base_dep'])
gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req, gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_net_dep']) fallback : ['gstreamer', 'gst_net_dep'])
if host_machine.system() != 'windows' if host_system != 'windows'
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req, gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_check_dep']) fallback : ['gstreamer', 'gst_check_dep'])
endif endif
...@@ -242,6 +242,7 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req, ...@@ -242,6 +242,7 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'video_dep']) fallback : ['gst-plugins-base', 'video_dep'])
# GStreamer OpenGL # GStreamer OpenGL
# FIXME: automagic
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req, gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstgl_dep'], required: false) fallback : ['gst-plugins-base', 'gstgl_dep'], required: false)
...@@ -276,41 +277,12 @@ if build_gstgl ...@@ -276,41 +277,12 @@ if build_gstgl
endforeach endforeach
endif endif
zlib_dep = dependency('zlib', required : false) zlib_dep = dependency('zlib', fallback: ['zlib', 'zlib_dep'])
bz2lib = cc.find_library('bz2', required : false)
glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']), glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']),
dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])] dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])]
gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep']) gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
cdata.set('HAVE_ZLIB', zlib_dep.found()) cdata.set('HAVE_ZLIB', zlib_dep.found())
cdata.set('HAVE_BZ2', bz2lib.found())
# Check all of the things.
# TODO: None of these are actually used yet because
# the build files haven't been written
deps = [
['gtk_dep','gtk+-3.0', '', ''],
['gtkx_dep','gtk+-x11-3.0', '', ''],
['caca_dep','caca', '', ''],
['libraw1394_dep','libraw1394', '>=2.0.0', ''],
['libiec61883_dep','libiec61883', '>=1.0.0', ''],
]
foreach d : deps
varname = d[0]
depname = d[1]
version = d[2]
confhname = d[3]
if version == ''
curdep = dependency(depname, required : false)
else
curdep = dependency(depname, required : false, version : version)
endif
set_variable(varname, curdep)
if curdep.found() and confhname != ''
cdata.set(confhname, 1)
endif
endforeach
gst_plugins_good_args = ['-DHAVE_CONFIG_H'] gst_plugins_good_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.') configinc = include_directories('.')
...@@ -318,20 +290,15 @@ libsinc = include_directories('gst-libs') ...@@ -318,20 +290,15 @@ libsinc = include_directories('gst-libs')
have_orcc = false have_orcc = false
orcc_args = [] orcc_args = []
if get_option('orc') != 'no' # Used by various libraries/elements that use Orc code
need_orc = get_option('orc') == 'yes' orc_dep = dependency('orc-0.4', version : orc_req, required : get_option('orc'))
# Used by various libraries/elements that use Orc code orcc = find_program('orcc', required : get_option('orc'))
orc_dep = dependency('orc-0.4', version : '>= 0.4.17', required : need_orc) if orc_dep.found() and orcc.found()
orcc = find_program('orcc', required : need_orc) have_orcc = true
if orc_dep.found() and orcc.found() orcc_args = [orcc, '--include', 'glib.h']
have_orcc = true cdata.set('HAVE_ORC', 1)
orcc_args = [orcc, '--include', 'glib.h']
cdata.set('HAVE_ORC', 1)
else
message('Orc Compiler not found, will use backup C code')
cdata.set('DISABLE_ORC', 1)
endif
else else
message('Orc Compiler not found, will use backup C code')
cdata.set('DISABLE_ORC', 1) cdata.set('DISABLE_ORC', 1)
endif endif
...@@ -375,7 +342,8 @@ subdir('tests') ...@@ -375,7 +342,8 @@ subdir('tests')
subdir('pkgconfig') subdir('pkgconfig')
# xgettext is optional (on Windows for instance) # xgettext is optional (on Windows for instance)
if get_option('nls') and find_program('xgettext', required : false).found() if find_program('xgettext', required : get_option('nls')).found()
cdata.set('ENABLE_NLS', 1)
subdir('po') subdir('po')
endif endif
......
# Enable V4L2 plugin to probe devices at plugin load # Feature options for plugins without external deps
option('v4l2-probe', type : 'boolean', value : true, option('alpha', type : 'feature', value : 'auto')
description : 'Probe v4l2 devices when the v4l2 plugin is loaded') option('apetag', type : 'feature', value : 'auto')
option('libv4l2', type : 'boolean', value : true, option('audiofx', type : 'feature', value : 'auto')
description : 'Use libv4l2 for some obscure format conversions') option('audioparsers', type : 'feature', value : 'auto')
option('auparse', type : 'feature', value : 'auto')
option('autodetect', type : 'feature', value : 'auto')
option('avi', type : 'feature', value : 'auto')
option('cutter', type : 'feature', value : 'auto')
option('debugutils', type : 'feature', value : 'auto')
option('deinterlace', type : 'feature', value : 'auto')
option('dtmf', type : 'feature', value : 'auto')
option('effectv', type : 'feature', value : 'auto')
option('equalizer', type : 'feature', value : 'auto')
option('flv', type : 'feature', value : 'auto')
option('flx', type : 'feature', value : 'auto')
option('goom', type : 'feature', value : 'auto')
option('goom2k1', type : 'feature', value : 'auto')
option('icydemux', type : 'feature', value : 'auto')
option('id3demux', type : 'feature', value : 'auto')
option('imagefreeze', type : 'feature', value : 'auto')
option('interleave', type : 'feature', value : 'auto')
option('isomp4', type : 'feature', value : 'auto')
option('law', type : 'feature', value : 'auto')
option('level', type : 'feature', value : 'auto')
option('matroska', type : 'feature', value : 'auto')
option('monoscope', type : 'feature', value : 'auto')
option('multifile', type : 'feature', value : 'auto')
option('multipart', type : 'feature', value : 'auto')
option('replaygain', type : 'feature', value : 'auto')
option('rtp', type : 'feature', value : 'auto')
option('rtpmanager', type : 'feature', value : 'auto')
option('rtsp', type : 'feature', value : 'auto')
option('shapewipe', type : 'feature', value : 'auto')
option('smpte', type : 'feature', value : 'auto')
option('spectrum', type : 'feature', value : 'auto')
option('udp', type : 'feature', value : 'auto')
option('videobox', type : 'feature', value : 'auto')
option('videocrop', type : 'feature', value : 'auto')
option('videofilter', type : 'feature', value : 'auto')
option('videomixer', type : 'feature', value : 'auto')
option('wavenc', type : 'feature', value : 'auto')
option('wavparse', type : 'feature', value : 'auto')
option('y4m', type : 'feature', value : 'auto')
# Feature options for plugins with external deps
option('aalib', type : 'feature', value : 'auto', description : 'aalib text console video sink plugin')
option('bz2', type : 'feature', value : 'auto', description : 'libbz2 support in the matroska plugin')
option('caca', type : 'feature', value : 'auto', description : 'libcaca text console video sink plugin')
option('cairo', type : 'feature', value : 'auto', description : 'Cairo overlay plugin')
option('directsound', type : 'feature', value : 'auto', description : 'Directsound audio source/sink plugin')
option('dv', type : 'feature', value : 'auto', description : 'Digital video decoder and demuxer plugin')
option('dv1394', type : 'feature', value : 'auto', description : 'Digital IEEE1394 interface video source plugin')
option('flac', type : 'feature', value : 'auto', description : 'FLAC audio codec plugin')
option('gdk-pixbuf', type : 'feature', value : 'auto', description : 'gdk-pixbuf image decoder, overlay, and sink plugin')
option('gtk3', type : 'feature', value : 'auto', description : 'GTK+ video sink plugin')
option('jack', type : 'feature', value : 'auto', description : 'JACK audio source/sink plugin')
option('jpeg', type : 'feature', value : 'auto', description : 'JPEG image codec plugin')
option('lame', type : 'feature', value : 'auto', description : 'LAME mp3 audio encoder plugin')
option('mpg123', type : 'feature', value : 'auto', description : 'mpg123 mp3 audio decoder plugin')
option('oss', type : 'feature', value : 'auto', description : 'OSS audio source/sink plugin')
option('oss4', type : 'feature', value : 'auto', description : 'OSSv4 audio source/sink plugin')
option('png', type : 'feature', value : 'auto', description : 'PNG image codec plugin')
option('pulse', type : 'feature', value : 'auto', description : 'Pulseaudio audio source/sink plugin')
option('qt5', type : 'feature', value : 'auto', description : 'Qt5 QML video sink plugin')
option('shout2', type : 'feature', value : 'auto', description : 'Shout-casting network sink plugin based on libshout2')
option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin')
option('speex', type : 'feature', value : 'auto', description : 'Speex audio codec plugin')
option('taglib', type : 'feature', value : 'auto', description : 'Tag-writing plugin based on taglib')
option('twolame', type : 'feature', value : 'auto', description : 'twolame mp2 audio encoder plugin')
option('vpx', type : 'feature', value : 'auto', description : 'VP8 and VP9 video codec plugin')
option('wavpack', type : 'feature', value : 'auto', description : 'Wavpack audio codec plugin')
option('x11', type : 'feature', value : 'auto', description : 'X11 ximagesrc plugin')
# v4l2 plugin options
option('v4l2', type : 'feature', value : 'auto', description : 'Build video4linux2 source/sink plugin')
option('v4l2-probe', type : 'boolean', value : true, description : 'Probe v4l2 devices when the v4l2 plugin is loaded')
option('v4l2-libv4l2', type : 'feature', value : 'auto', description : 'Use libv4l2 for some obscure format conversions')
option('v4l2-gudev', type : 'feature', value : 'auto', description : 'Use libgudev for probing v4l2 devices')
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
option('orc', type : 'feature', value : 'auto', yield : true)
# Common options # Common options