diff --git a/subprojects/gst-plugins-bad/sys/applemedia/meson.build b/subprojects/gst-plugins-bad/sys/applemedia/meson.build index f8bc5974f6..845d725010 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/meson.build +++ b/subprojects/gst-plugins-bad/sys/applemedia/meson.build @@ -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',