From 3d22e7d9da88d1ea150a69ed7a7f41297806453c Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 3 Aug 2018 19:06:00 +1000 Subject: [PATCH] gl/meson: fix macos additions for non-macos platforms "gst-libs/gst/gl/meson.build:655:20: ERROR: Unknown variable "quartzcore_dep"." --- gst-libs/gst/gl/meson.build | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index 17e2a8f69a..65fc7f5137 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -624,6 +624,17 @@ if need_platform_wgl != 'no' and need_win_win32 != 'no' endif endif +# OSX check +if need_platform_cgl == 'yes' + if need_win_cocoa == 'no' + error('Impossible situation requested: Cannot use CGL without Cocoa support') + elif need_api_opengl == 'no' + error('Impossible situation requested: Cannot use CGL without the OpenGL library') + endif +elif need_platform_cgl == 'no' and need_win_cocoa == 'yes' + error('Impossible situation requested: Cannot use Cocoa without CGL support') +endif + if host_machine.system() == 'darwin' if not have_objc error('No ObjC compiler found') @@ -638,43 +649,32 @@ if host_machine.system() == 'darwin' quartzcore_dep = dependency('QuartzCore', required : false) corefoundation_dep = dependency('CoreFoundation', required : false) -endif -# OSX check -if need_platform_cgl == 'yes' - if need_win_cocoa == 'no' - error('Impossible situation requested: Cannot use CGL without Cocoa support') - elif need_api_opengl == 'no' - error('Impossible situation requested: Cannot use CGL without the OpenGL library') - endif -elif need_platform_cgl == 'no' and need_win_cocoa == 'yes' - error('Impossible situation requested: Cannot use Cocoa without CGL support') -endif + if need_platform_cgl != 'no' + if quartzcore_dep.found() and corefoundation_dep.found() + gl_platform_deps += [quartzcore_dep, corefoundation_dep] + enabled_gl_platforms += 'cgl' + glconf.set10('GST_GL_HAVE_PLATFORM_CGL', 1) -if need_platform_cgl != 'no' - if quartzcore_dep.found() and corefoundation_dep.found() - gl_platform_deps += [quartzcore_dep, corefoundation_dep] - enabled_gl_platforms += 'cgl' - glconf.set10('GST_GL_HAVE_PLATFORM_CGL', 1) - - if need_win_cocoa != 'no' - cocoa_dep = dependency('Cocoa', required : false) - if cocoa_dep.found() - gl_sources += [ - 'cocoa/gstglcaopengllayer.m', - 'cocoa/gstglcontext_cocoa.m', - 'cocoa/gstgldisplay_cocoa.m', - 'cocoa/gstglwindow_cocoa.m' - ] - gl_winsys_deps += cocoa_dep - enabled_gl_winsys += 'cocoa' - glconf.set10('GST_GL_HAVE_WINDOW_COCOA', 1) - elif need_win_cocoa == 'yes' - error('Could not find Cocoa') + if need_win_cocoa != 'no' + cocoa_dep = dependency('Cocoa', required : false) + if cocoa_dep.found() + gl_sources += [ + 'cocoa/gstglcaopengllayer.m', + 'cocoa/gstglcontext_cocoa.m', + 'cocoa/gstgldisplay_cocoa.m', + 'cocoa/gstglwindow_cocoa.m' + ] + gl_winsys_deps += cocoa_dep + enabled_gl_winsys += 'cocoa' + glconf.set10('GST_GL_HAVE_WINDOW_COCOA', 1) + elif need_win_cocoa == 'yes' + error('Could not find Cocoa') + endif endif + elif need_platform_cgl == 'yes' + error('Could not find CGL dependencies') endif - elif need_platform_cgl == 'yes' - error('Could not find CGL dependencies') endif endif