examples/gl/gtk: Fix build on macOS
authorPhilippe Normand <philn@igalia.com>
Thu, 27 Dec 2018 13:55:28 +0000 (14:55 +0100)
committerPhilippe Normand <philn@igalia.com>
Thu, 27 Dec 2018 13:55:28 +0000 (14:55 +0100)
The gdkquartz.h include pulls into Apple Obj-C frameworks so the compiler needs
to handle the gstgtkhelper library as such.

Fixes #518

tests/examples/gl/gtk/meson.build
tests/examples/gl/meson.build

index d019136337cb21c4a310c52978c8ae6301b26d8d..22db40aacd601f0e60bb6178e3649a435ac1ba2d 100644 (file)
@@ -3,9 +3,15 @@ if cc.has_argument ('-Wno-parentheses')
   extra_args += '-Wno-parentheses'
 endif
 
+if host_system == 'darwin'
+  extra_c_args = ['-xobjective-c']
+else
+  extra_c_args = []
+endif
+
 gstgtkhelper = static_library ('gstgtkhelper',
   ['gstgtk.c'],
-  c_args : gst_plugins_base_args,
+  c_args : gst_plugins_base_args + extra_c_args,
   include_directories : [configinc, libsinc],
   dependencies : [gst_base_dep, video_dep, gtk_dep],
   install : false)
index d092d4688fe98724943ac95f0a0606b50cf6a1dd..086758f17ff33ca0bac4a3c0ea35dfe2d167e1ec 100644 (file)
@@ -1,9 +1,5 @@
 subdir('cocoa')
 subdir('generic')
-# FIXME: gtk is temporarily disabled. 
-#        See. https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/518
-if host_system != 'darwin'
 subdir('gtk', if_found : gtk_dep)
-endif
 # FIXME: subdir('qt')
 subdir('sdl')