cmake: allow using system VMA library

This commit is contained in:
Alexandre Bouvier 2023-06-27 22:54:33 +02:00
parent 28598c9090
commit c3050c1b48
7 changed files with 11 additions and 6 deletions

View file

@ -144,9 +144,9 @@ endif()
add_subdirectory(nx_tzdb)
# VMA
add_library(vma vma/vma.cpp)
target_include_directories(vma PUBLIC ./vma/VulkanMemoryAllocator/include)
target_link_libraries(vma PRIVATE Vulkan::Headers)
if (NOT TARGET GPUOpen::VulkanMemoryAllocator)
add_subdirectory(VulkanMemoryAllocator)
endif()
if (NOT TARGET LLVM::Demangle)
add_library(demangle demangle/ItaniumDemangle.cpp)

1
externals/VulkanMemoryAllocator vendored Submodule

@ -0,0 +1 @@
Subproject commit 9b0fc3e7b02afe97895eb3e945fe800c3a7485ac

@ -1 +0,0 @@
Subproject commit 0aa3989b8f382f185fdf646cc83a1d16fa31d6ab

View file

@ -1,8 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#define VMA_IMPLEMENTATION
#define VMA_STATIC_VULKAN_FUNCTIONS 0
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
#include <vk_mem_alloc.h>