project('gst-plugins-good', 'c',
- version : '1.13.0.1',
- meson_version : '>= 0.36.0',
+ version : '1.15.0.1',
+ meson_version : '>= 0.46.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
gst_version_nano = 0
endif
+have_cxx = add_languages('cpp', required : false)
+
glib_req = '>= 2.40.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
noseh_link_args = []
endif
+if cc.has_link_argument('-Wl,-Bsymbolic-functions')
+ add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
+endif
+
# Symbol visibility
if cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
cdata.set('PACKAGE', '"gst-plugins-good"')
cdata.set('GETTEXT_PACKAGE', '"gst-plugins-good-1.0"')
+warning_flags = [
+ '-Wmissing-declarations',
+ '-Wredundant-decls',
+ '-Wwrite-strings',
+ '-Winit-self',
+ '-Wmissing-include-dirs',
+ '-Wno-multichar',
+ '-Wvla',
+ '-Wpointer-arith',
+]
+
+warning_c_flags = [
+ '-Wmissing-prototypes',
+ '-Wdeclaration-after-statement',
+ '-Wold-style-definition',
+ '-Waggregate-return',
+]
+
+if have_cxx
+ cxx = meson.get_compiler('cpp')
+endif
+
+foreach extra_arg : warning_flags
+ if cc.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'c')
+ endif
+ if have_cxx and cxx.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'cpp')
+ endif
+endforeach
+
+foreach extra_arg : warning_c_flags
+ if cc.has_argument (extra_arg)
+ add_project_arguments([extra_arg], language: 'c')
+ endif
+endforeach
+
# GStreamer package name and origin url
gst_package_name = get_option('with-package-name')
if gst_package_name == ''
gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'video_dep'])
+# GStreamer OpenGL
+gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
+ fallback : ['gst-plugins-base', 'gstgl_dep'], required: false)
+
+build_gstgl = gstgl_dep.found() # FIXME: add option?
+
+if build_gstgl
+ if gstgl_dep.type_name() == 'pkgconfig'
+ gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
+ gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
+ gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
+ else
+ gstbase = subproject('gst-plugins-base')
+ gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
+ gst_gl_winsys = gstbase.get_variable('enabled_gl_winsys')
+ gst_gl_platforms = gstbase.get_variable('enabled_gl_platforms')
+ endif
+
+ message('GStreamer OpenGL window systems: @0@'.format(' '.join(gst_gl_winsys)))
+ message('GStreamer OpenGL platforms: @0@'.format(' '.join(gst_gl_platforms)))
+ message('GStreamer OpenGL apis: @0@'.format(' '.join(gst_gl_apis)))
+
+ foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 'dispmanx', 'viv_fb']
+ set_variable('gst_gl_have_window_@0@'.format(ws), gst_gl_winsys.contains(ws))
+ endforeach
+
+ foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
+ set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p))
+ endforeach
+
+ foreach api : ['opengl', 'gles2']
+ set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
+ endforeach
+endif
+
zlib_dep = dependency('zlib', required : false)
bz2lib = cc.find_library('bz2', required : false)
glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']),
presetdir = join_paths(get_option('datadir'), 'gstreamer-' + api_version, 'presets')
+pkgconfig = import('pkgconfig')
+plugins_pkgconfig_install_dir = join_paths(plugins_install_dir, 'pkgconfig')
+if get_option('default_library') == 'shared'
+ # If we don't build static plugins there is no need to generate pc files
+ plugins_pkgconfig_install_dir = disabler()
+endif
+
subdir('gst')
subdir('sys')
subdir('ext')