forked from AuroraMiddleware/gtk
media: Check for gstreamer verion instead of using cc.links()
This fix error when gstgl_dep comes from a subproject because in that case it cannot be used in compiler checks.
This commit is contained in:
parent
76a8eb4960
commit
2c060663cf
@ -49,17 +49,9 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version: '>= 1.12.3',
|
|||||||
if gstplayer_dep.found() and gstgl_dep.found()
|
if gstplayer_dep.found() and gstgl_dep.found()
|
||||||
extra_win_cflags = []
|
extra_win_cflags = []
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows' and gstgl_dep.version().version_compare('>=1.19.1')
|
||||||
new_gst_gl_display_code = \
|
message('libgstgl has gst_gl_display_new_with_type()')
|
||||||
'''#include <gst/gl/gstgldisplay.h>
|
extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
|
||||||
int main (int a, char ** g) {
|
|
||||||
GstGLDisplay *d = gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_WIN32);
|
|
||||||
return 0;
|
|
||||||
}'''
|
|
||||||
if cc.links(new_gst_gl_display_code, dependencies : gstgl_dep)
|
|
||||||
message('libgstgl has gst_gl_display_new_with_type()')
|
|
||||||
extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
media_backends += 'gstreamer'
|
media_backends += 'gstreamer'
|
||||||
|
Loading…
Reference in New Issue
Block a user