mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
gst-examples: add -xobjective-c for darwin
To avoid error when including #include <AppKit/AppKit.h> the build should include the c args xobjective-c Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
This commit is contained in:
parent
e7f198a898
commit
5020a6e83a
3 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,8 @@ if cc.get_id() == 'msvc'
|
||||||
language : 'c')
|
language : 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
host_system = host_machine.system()
|
||||||
|
|
||||||
gst_version = meson.project_version()
|
gst_version = meson.project_version()
|
||||||
version_arr = gst_version.split('.')
|
version_arr = gst_version.split('.')
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ video_area_realize_cb (GtkWidget * widget, GtkPlay * play)
|
||||||
#if defined (GDK_WINDOWING_WIN32)
|
#if defined (GDK_WINDOWING_WIN32)
|
||||||
window_handle = (guintptr) GDK_WINDOW_HWND (window);
|
window_handle = (guintptr) GDK_WINDOW_HWND (window);
|
||||||
#elif defined (GDK_WINDOWING_QUARTZ)
|
#elif defined (GDK_WINDOWING_QUARTZ)
|
||||||
window_handle = gdk_quartz_window_get_nsview (window);
|
window_handle = (guintptr) gdk_quartz_window_get_nsview (window);
|
||||||
#elif defined (GDK_WINDOWING_X11)
|
#elif defined (GDK_WINDOWING_X11)
|
||||||
window_handle = GDK_WINDOW_XID (window);
|
window_handle = GDK_WINDOW_XID (window);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
gtk_dep = dependency('gtk+-3.0', required: false)
|
gtk_dep = dependency('gtk+-3.0', required: false)
|
||||||
x11_dep = dependency('x11', required: false)
|
x11_dep = dependency('x11', required: false)
|
||||||
|
|
||||||
|
if host_system == 'darwin'
|
||||||
|
extra_c_args = ['-xobjective-c']
|
||||||
|
else
|
||||||
|
extra_c_args = []
|
||||||
|
endif
|
||||||
|
|
||||||
if gtk_dep.found()
|
if gtk_dep.found()
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
|
|
||||||
|
@ -13,5 +19,6 @@ if gtk_dep.found()
|
||||||
gtk_play_resources,
|
gtk_play_resources,
|
||||||
'gtk-video-renderer.h',
|
'gtk-video-renderer.h',
|
||||||
'gtk-video-renderer.c'],
|
'gtk-video-renderer.c'],
|
||||||
|
c_args : extra_c_args,
|
||||||
dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep])
|
dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep])
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue