gl/meson: fix macos additions for non-macos platforms

"gst-libs/gst/gl/meson.build:655:20: ERROR:  Unknown variable "quartzcore_dep"."
This commit is contained in:
Matthew Waters 2018-08-03 19:06:00 +10:00
parent 06b8792a5f
commit 3d22e7d9da

View File

@ -624,6 +624,17 @@ if need_platform_wgl != 'no' and need_win_win32 != 'no'
endif endif
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 host_machine.system() == 'darwin'
if not have_objc if not have_objc
error('No ObjC compiler found') error('No ObjC compiler found')
@ -638,20 +649,8 @@ if host_machine.system() == 'darwin'
quartzcore_dep = dependency('QuartzCore', required : false) quartzcore_dep = dependency('QuartzCore', required : false)
corefoundation_dep = dependency('CoreFoundation', required : false) corefoundation_dep = dependency('CoreFoundation', required : false)
endif
# OSX check if need_platform_cgl != 'no'
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() if quartzcore_dep.found() and corefoundation_dep.found()
gl_platform_deps += [quartzcore_dep, corefoundation_dep] gl_platform_deps += [quartzcore_dep, corefoundation_dep]
enabled_gl_platforms += 'cgl' enabled_gl_platforms += 'cgl'
@ -676,6 +675,7 @@ if need_platform_cgl != 'no'
elif need_platform_cgl == 'yes' elif need_platform_cgl == 'yes'
error('Could not find CGL dependencies') error('Could not find CGL dependencies')
endif endif
endif
endif endif
# GDM Checks # GDM Checks