I’m having some trouble building SDL2 with Vulkan support for iOS (and I think macOS as well?). My current setup is as follows:
SIP disabled (i.e.
DYLD_LIBRARY_PATH and such is available when using
VulkanSDK installed (
brew cask install vulkan-sdk)
The following environment variables are set:
export VULKAN_SDK=/usr/local/Caskroom/vulkan-sdk/18.104.22.168/macOS export VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d/MoltenVK_icd.json export DYLD_LIBRARY_PATH=$VULKAN_SDK/lib export VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/explicit_layer.d export CFLAGS="-I/usr/local/Caskroom/vulkan-sdk/22.214.171.124/macOS/include" export LDFLAGS="-L/usr/local/Caskroom/vulkan-sdk/126.96.36.199/macOS/lib"
I have tried a number of different variations with the above flags, but nothing seems to work. CMake itself has no problems finding Vulkan when using
I have tried building using both the
iosbuild.sh script and the bundled Xcode project. I have also tried building (for macOS) using the CMake build system, and I can’t get it to recognize that I have the Vulkan SDK installed either (always
VIDEO_VULKAN (Wanted: ON): OFF).
So I guess my question is, how are you supposed to build SDL2 with Vulkan support for iOS? I’ve tried everything I’ve found when searching around and reading the docs, and I’m starting to run of ideas here… I would really appreciate some help please.