From: Xavier Claessens Date: Wed, 1 Sep 2021 12:08:43 +0000 (-0400) Subject: media: Check for gstreamer verion instead of using cc.links() X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2^2~124^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f5d959a947d0a38b1b0fe5fbcc48b44f41e36d3;p=gtk4.git 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. --- diff --git a/modules/media/meson.build b/modules/media/meson.build index 1bd91821d8..d24f84dd86 100644 --- a/modules/media/meson.build +++ b/modules/media/meson.build @@ -49,17 +49,9 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version: '>= 1.12.3', if gstplayer_dep.found() and gstgl_dep.found() extra_win_cflags = [] - if host_machine.system() == 'windows' - new_gst_gl_display_code = \ - '''#include - 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 + if host_machine.system() == 'windows' and gstgl_dep.version().version_compare('>=1.19.1') + message('libgstgl has gst_gl_display_new_with_type()') + extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE' endif media_backends += 'gstreamer'