mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
vulkan: fix macos build
The VulkanSDK can be downloaded from LunarG website and can be installed properly in /usr/local following: https://vulkan.lunarg.com/doc/view/latest/mac/getting_started.html Fixes partly #2372 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6669>
This commit is contained in:
parent
b6d03432b4
commit
fe737fc274
1 changed files with 11 additions and 8 deletions
|
@ -107,13 +107,16 @@ foreach option : vulkan_conf_options
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if ['ios', 'darwin'].contains(host_system)
|
if ['ios', 'darwin'].contains(host_system)
|
||||||
# - ios does not support the loader/validation layers
|
vulkan_dep = dependency('vulkan', method: 'pkg-config', required : false)
|
||||||
# - We need to link directly to MoltenVK to be able to use
|
if not vulkan_dep.found()
|
||||||
# MoltenVK-specific functions that use dispatchable handles (like
|
# - ios does not support the loader/validation layers
|
||||||
# retrieving the metal device from the VkDevice) which is currently waiting
|
# - We need to link directly to MoltenVK to be able to use
|
||||||
# on implementing a proper Metal extension for Vulkan
|
# MoltenVK-specific functions that use dispatchable handles (like
|
||||||
# https://github.com/KhronosGroup/MoltenVK/issues/492
|
# retrieving the metal device from the VkDevice) which is currently waiting
|
||||||
vulkan_dep = cc.find_library('MoltenVK', required : get_option('vulkan'))
|
# on implementing a proper Metal extension for Vulkan
|
||||||
|
# https://github.com/KhronosGroup/MoltenVK/issues/492
|
||||||
|
vulkan_dep = cc.find_library('MoltenVK', required : get_option('vulkan'))
|
||||||
|
endif
|
||||||
elif host_system == 'windows'
|
elif host_system == 'windows'
|
||||||
vulkan_root = run_command(python3, '-c', 'import os; print(os.environ.get("VK_SDK_PATH"))', check: false).stdout().strip()
|
vulkan_root = run_command(python3, '-c', 'import os; print(os.environ.get("VK_SDK_PATH"))', check: false).stdout().strip()
|
||||||
if vulkan_root != '' and vulkan_root != 'None'
|
if vulkan_root != '' and vulkan_root != 'None'
|
||||||
|
@ -144,7 +147,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_system != 'windows'
|
if host_system != 'windows'
|
||||||
has_vulkan_header = cc.has_header('vulkan/vulkan_core.h')
|
has_vulkan_header = cc.has_header('vulkan/vulkan_core.h', dependencies: vulkan_dep)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not has_vulkan_header and get_option('vulkan').enabled()
|
if not has_vulkan_header and get_option('vulkan').enabled()
|
||||||
|
|
Loading…
Reference in a new issue