meson: Fix vulkan automagic in applemedia plugin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
This commit is contained in:
Nirbheek Chauhan 2024-06-23 04:20:59 +05:30
parent 5ed3e045d8
commit 4293719206

View file

@ -91,10 +91,13 @@ foreach framework : applemedia_frameworks
endforeach
applemedia_objcpp_args = []
if gstvulkan_dep.found() and have_objcpp
moltenvk_dep = cc.find_library('MoltenVK', required : false)
metal_dep = dependency('appleframeworks', modules : ['Metal'], required : false)
if metal_dep.found() and moltenvk_dep.found() and cc.has_header ('MoltenVK/vk_mvk_moltenvk.h')
vulkan_option = get_option('vulkan')
vk_required = applemedia_option.enabled() and vulkan_option.enabled()
if gstvulkan_dep.found() and have_objcpp and not vulkan_option.disabled()
moltenvk_dep = cc.find_library('MoltenVK', required: vk_required)
metal_dep = dependency('appleframeworks', modules : ['Metal'], required: vk_required)
have_mvk_header = cc.has_header('MoltenVK/vk_mvk_moltenvk.h', required: vk_required)
if metal_dep.found() and moltenvk_dep.found() and have_mvk_header
applemedia_frameworks += [moltenvk_dep, gstvulkan_dep, metal_dep]
applemedia_sources += [
'videotexturecache-vulkan.mm',