meson: Move VMA options into meson config

This commit is contained in:
Matt Borgerson 2024-07-26 17:21:01 -07:00 committed by mborgerson
parent 2bc8cb3050
commit 2800b8d22a
2 changed files with 6 additions and 5 deletions

View File

@ -35,9 +35,6 @@
#include <glslang/Include/glslang_c_interface.h>
#include <volk.h>
#include <spirv_reflect.h>
#define VMA_STATIC_VULKAN_FUNCTIONS 1
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
#include <vk_mem_alloc.h>
#include "debug.h"

View File

@ -3,8 +3,12 @@ if vulkan.found()
libvolk = static_library('volk', sources: 'volk/volk.c', c_args: ['-DVK_NO_PROTOTYPES'], dependencies: vulkan)
volk = declare_dependency(compile_args: ['-DVK_NO_PROTOTYPES'], include_directories: 'volk', link_with: libvolk, dependencies: vulkan)
libvma = static_library('vma', sources: 'vma.cc', include_directories: 'VulkanMemoryAllocator/include', dependencies: [vulkan, volk])
vma = declare_dependency(include_directories: 'VulkanMemoryAllocator/include', link_with: libvma)
vma_defns = [
'-DVMA_STATIC_VULKAN_FUNCTIONS=1',
'-DVMA_DYNAMIC_VULKAN_FUNCTIONS=0',
]
libvma = static_library('vma', sources: 'vma.cc', c_args: vma_defns, include_directories: 'VulkanMemoryAllocator/include', dependencies: [vulkan, volk])
vma = declare_dependency(compile_args: vma_defns, include_directories: 'VulkanMemoryAllocator/include', link_with: libvma)
libspirv_reflect = static_library('spirv_reflect', sources: 'SPIRV-Reflect/spirv_reflect.c', dependencies: vulkan)
spirv_reflect = declare_dependency(include_directories: 'SPIRV-Reflect', link_with: libspirv_reflect, dependencies: vulkan)