summaryrefslogtreecommitdiff
path: root/drivers/vulkan/SCsub
diff options
context:
space:
mode:
authorSergey Minakov <naithar@icloud.com>2020-07-16 20:04:09 +0300
committerSergey Minakov <naithar@icloud.com>2020-07-25 21:55:25 +0200
commitfe60815d665ab49662ad570609389276b2ec6038 (patch)
tree63433e9fa8b08e3286e64d6b4fe5dde23c2227d1 /drivers/vulkan/SCsub
parent8e82ab4bf5c518a322cf3a86ae88ffc7bb05b1f9 (diff)
iOS SCons: static Vulkan binary usage
Add VMA to iphone platform Use linkflag for iphone building to enforce static linking. Works fine with dynamic '.framework' library Updated xcode project to use '.a' static library
Diffstat (limited to 'drivers/vulkan/SCsub')
-rw-r--r--drivers/vulkan/SCsub21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub
index 91d0e42f80..436f513d72 100644
--- a/drivers/vulkan/SCsub
+++ b/drivers/vulkan/SCsub
@@ -22,6 +22,17 @@ if env["platform"] == "android":
thirdparty_dir = "#thirdparty/vulkan"
vma_sources = [thirdparty_dir + "/android/vk_mem_alloc.cpp"]
env_thirdparty.add_source_files(env.drivers_sources, vma_sources)
+elif env["platform"] == "iphone":
+ # Use bundled Vulkan headers
+ thirdparty_dir = "#thirdparty/vulkan"
+ env.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include", thirdparty_dir + "/loader"])
+
+ # Build Vulkan memory allocator
+ env_thirdparty = env.Clone()
+ env_thirdparty.disable_warnings()
+
+ vma_sources = [thirdparty_dir + "/vk_mem_alloc.cpp"]
+ env_thirdparty.add_source_files(env.drivers_sources, vma_sources)
elif env["builtin_vulkan"]:
# Use bundled Vulkan headers
thirdparty_dir = "#thirdparty/vulkan"
@@ -70,16 +81,6 @@ elif env["builtin_vulkan"]:
'FALLBACK_CONFIG_DIRS=\\"%s\\"' % "/etc/xdg",
]
)
- elif env["platform"] == "iphone":
- env_thirdparty.AppendUnique(
- CPPDEFINES=[
- "VK_USE_PLATFORM_IOS_MVK",
- "VULKAN_NON_CMAKE_BUILD",
- 'SYSCONFDIR=\\"%s\\"' % "/etc",
- 'FALLBACK_DATA_DIRS=\\"%s\\"' % "/usr/local/share:/usr/share",
- 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % "/etc/xdg",
- ]
- )
elif env["platform"] == "linuxbsd":
env_thirdparty.AppendUnique(
CPPDEFINES=[