diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-09-01 08:08:43 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2021-09-01 12:04:05 -0400 |
commit | 2c060663cf0821de8b75b7a48ea46e66d4243777 (patch) | |
tree | 76bbc3ea29962a0a5eed60c8c0000936f8b4790c /modules | |
parent | 76a8eb4960fd878d5c10920f04f34c7317c5d1d3 (diff) | |
download | gtk+-2c060663cf0821de8b75b7a48ea46e66d4243777.tar.gz |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/media/meson.build | 14 |
1 files changed, 3 insertions, 11 deletions
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 <gst/gl/gstgldisplay.h> - 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' |