diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-26 13:20:08 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-26 13:20:08 +0200 |
commit | 3b340985cc36839e36429d46e53b8a99b3656704 (patch) | |
tree | 91beccbd09445fb702b24fb7852d848655f1b519 /drivers/vulkan/SCsub | |
parent | 9856c8fda45c080886603515320faec4858d46dd (diff) |
SCons: Support linking system Vulkan loader while using vendored VMA
Diffstat (limited to 'drivers/vulkan/SCsub')
-rw-r--r-- | drivers/vulkan/SCsub | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 436f513d72..61d91711da 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -4,6 +4,7 @@ Import("env") env.add_source_files(env.drivers_sources, "*.cpp") +# FIXME: Refactor all this to reduce code duplication. if env["platform"] == "android": # Use NDK Vulkan headers thirdparty_dir = env["ANDROID_NDK_ROOT"] + "/sources/third_party/vulkan/src" @@ -100,3 +101,13 @@ elif env["builtin_vulkan"]: loader_sources = [thirdparty_dir + "/loader/" + file for file in loader_sources] env_thirdparty.add_source_files(env.drivers_sources, loader_sources) env_thirdparty.add_source_files(env.drivers_sources, vma_sources) +else: # Always build VMA. + thirdparty_dir = "#thirdparty/vulkan" + env.Prepend(CPPPATH=[thirdparty_dir]) + + # Build Vulkan loader library + 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) |