mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
meson: add option for opengl and the misc optional gl plugin deps
Finer control over the opengl integration library dependencies is already implemented via the gl_api, gl_platform, and gl_winsys options. https://bugzilla.gnome.org/show_bug.cgi?id=796947
This commit is contained in:
parent
8829a8707a
commit
4ec1ba433d
3 changed files with 94 additions and 76 deletions
|
@ -47,7 +47,10 @@ opengl_sources = [
|
|||
'gstglutils.c'
|
||||
]
|
||||
|
||||
if build_gstgl and gstgl_dep.found()
|
||||
if get_option('gl').disabled() or not gstgl_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
optional_deps = []
|
||||
|
||||
if gl_dep.found() # have desktop GL
|
||||
|
@ -58,7 +61,7 @@ if build_gstgl and gstgl_dep.found()
|
|||
]
|
||||
endif
|
||||
|
||||
graphene_dep = dependency('graphene-1.0', version : '>=1.4.0', required : false)
|
||||
graphene_dep = dependency('graphene-1.0', version : '>=1.4.0', required : get_option('gl-graphene'))
|
||||
if graphene_dep.found()
|
||||
optional_deps += graphene_dep
|
||||
core_conf.set('HAVE_GRAPHENE', true)
|
||||
|
@ -68,10 +71,10 @@ if build_gstgl and gstgl_dep.found()
|
|||
]
|
||||
endif
|
||||
|
||||
png_dep = dependency('libpng', version : '>=1.0', required : false)
|
||||
png_dep = dependency('libpng', version : '>=1.0', required : get_option('gl-png'))
|
||||
jpeg_dep = cc.find_library('jpeg-mmx', required : false)
|
||||
if not jpeg_dep.found()
|
||||
jpeg_dep = cc.find_library('jpeg', required : false)
|
||||
jpeg_dep = cc.find_library('jpeg', required : get_option('gl-jpeg'))
|
||||
endif
|
||||
|
||||
if png_dep.found()
|
||||
|
@ -120,7 +123,6 @@ if build_gstgl and gstgl_dep.found()
|
|||
dependencies : [gstgl_dep, video_dep,
|
||||
gst_base_dep, gst_controller_dep, libm] + optional_deps,
|
||||
install : true,
|
||||
install_dir : plugins_install_dir,
|
||||
)
|
||||
install_dir : plugins_install_dir)
|
||||
|
||||
pkgconfig.generate(gstopengl, install_dir : plugins_pkgconfig_install_dir)
|
||||
endif
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
if get_option('gl').disabled()
|
||||
message('GStreamer OpenGL integration disabled via options.')
|
||||
gstgl_dep = disabler()
|
||||
build_gstgl = false
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
gl_sources = [
|
||||
'gstglapi.c',
|
||||
'gstglbasefilter.c',
|
||||
|
@ -821,4 +828,7 @@ if build_gstgl
|
|||
include_directories : [libsinc, compat_includes],
|
||||
sources: gen_sources,
|
||||
dependencies : [video_dep, gst_base_dep] + gl_winsys_deps)
|
||||
|
||||
elif get_option('gl').enabled()
|
||||
error('GStreamer OpenGL integration required via options, but needed dependencies not found.')
|
||||
endif
|
||||
|
|
|
@ -21,6 +21,12 @@ option('opengl_module_name', type : 'string', value : '',
|
|||
option('gles2_module_name', type : 'string', value : '',
|
||||
description : 'The file to pass to g_module_open to open the libGLESv2 library (default: libGLESv2)')
|
||||
|
||||
# Feature option for opengl plugin and integration library
|
||||
option('gl', type : 'feature', value : 'auto', description : 'OpenGL integration library and OpenGL plugin')
|
||||
option('gl-graphene', type : 'feature', value : 'auto', description : 'Use Graphene in OpenGL plugin')
|
||||
option('gl-jpeg', type : 'feature', value : 'auto', description : 'Use libjpeg in OpenGL plugin')
|
||||
option('gl-png', type : 'feature', value : 'auto', description : 'Use libpng in OpenGL plugin')
|
||||
|
||||
# Feature options for plugins with no external deps
|
||||
option('adder', type : 'feature', value : 'auto')
|
||||
option('app', type : 'feature', value : 'auto')
|
||||
|
|
Loading…
Reference in a new issue