1gtk_sources = [ 2 'gstgtkbasesink.c', 3 'gstgtksink.c', 4 'gstgtkutils.c', 5 'gstplugin.c', 6 'gtkgstbasewidget.c', 7 'gtkgstwidget.c', 8] 9 10gtk_defines = [] 11optional_deps = [] 12 13gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) 14if gtk_dep.found() 15 # FIXME: automagic 16 if have_gstgl and gtk_dep.version().version_compare('>=3.15.0') 17 have_gtk3_gl_windowing = false 18 19 if gst_gl_have_window_x11 and gst_gl_have_platform_glx 20 # FIXME: automagic 21 gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) 22 if gtk_x11_dep.found() 23 optional_deps += [gtk_x11_dep, gstglx11_dep] 24 have_gtk3_gl_windowing = true 25 endif 26 endif 27 28 if gst_gl_have_window_wayland and gst_gl_have_platform_egl 29 # FIXME: automagic 30 gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) 31 if gtk_wayland_dep.found() 32 optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep] 33 have_gtk3_gl_windowing = true 34 endif 35 endif 36 37 if have_gtk3_gl_windowing 38 gtk_sources += [ 39 'gstgtkglsink.c', 40 'gtkgstglwidget.c', 41 ] 42 optional_deps += [gstgl_dep, gstglproto_dep] 43 gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] 44 endif 45 endif 46 47 gstgtk = library('gstgtk', 48 gtk_sources, 49 c_args : gst_plugins_good_args + gtk_defines, 50 link_args : noseh_link_args, 51 include_directories : [configinc], 52 dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, 53 install : true, 54 install_dir : plugins_install_dir, 55 ) 56 pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir) 57 plugins += [gstgtk] 58endif 59 60