meson: add build files for the gtk plugin
authorMatthew Waters <matthew@centricular.com>
Fri, 9 Sep 2016 06:36:03 +0000 (16:36 +1000)
committerMatthew Waters <matthew@centricular.com>
Fri, 9 Sep 2016 06:36:03 +0000 (16:36 +1000)
ext/gtk/meson.build [new file with mode: 0644]
ext/meson.build

diff --git a/ext/gtk/meson.build b/ext/gtk/meson.build
new file mode 100644 (file)
index 0000000..d041fbd
--- /dev/null
@@ -0,0 +1,54 @@
+gtk_sources = [
+  'gstgtkbasesink.c',
+  'gstgtksink.c',
+  'gstgtkutils.c',
+  'gstplugin.c',
+  'gtkgstbasewidget.c',
+  'gtkgstwidget.c',
+]
+
+gtk_defines = []
+optional_deps = []
+
+gtk_dep = dependency('gtk+-3.0', required : false)
+if gtk_dep.found()
+  if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0')
+    have_gtk3_gl_windowing = false
+
+    if x11_dep.found() and gl_dep.found()
+      gtk_x11_dep = dependency('gtk+-x11-3.0', required : false)
+      if gtk_x11_dep.found()
+        optional_deps += gtk_x11_dep
+        have_gtk3_gl_windowing = true
+      endif
+    endif
+
+    if wayland_egl_dep.found() and egl_dep.found()
+      gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false)
+      if gtk_wayland_dep.found()
+        optional_deps += gtk_wayland_dep
+        have_gtk3_gl_windowing = true
+      endif
+    endif
+
+    if have_gtk3_gl_windowing
+      gtk_sources += [
+        'gstgtkglsink.c',
+        'gtkgstglwidget.c',
+      ]
+      optional_deps += gstgl_dep
+      gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL']
+    endif
+  endif
+
+  gstgtk = library('gstgtk',
+    gtk_sources,
+    c_args : gst_plugins_bad_args + gtk_defines,
+    link_args : noseh_link_args,
+    include_directories : [configinc],
+    dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps,
+    install : true,
+    install_dir : plugins_install_dir,
+  )
+endif
+
index f91a737..09f4bb0 100644 (file)
@@ -17,7 +17,7 @@ subdir('fluidsynth')
 subdir('gl')
 #subdir('gme')
 #subdir('gsm')
-#subdir('gtk')
+subdir('gtk')
 subdir('hls')
 subdir('kate')
 #subdir('ladspa')