From b6c6dcc5760ebaf08460c176c42d1c4729e2eb21 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sun, 25 Jun 2023 15:08:38 +0300 Subject: [PATCH] externals: Use cmake subdirectory --- .gitmodules | 4 ++-- externals/CMakeLists.txt | 2 +- externals/vma/{vma => VulkanMemoryAllocator} | 0 externals/vma/vma.cpp | 1 + src/video_core/vulkan_common/vulkan_device.cpp | 2 -- src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 2 -- src/video_core/vulkan_common/vulkan_wrapper.cpp | 2 -- 7 files changed, 4 insertions(+), 9 deletions(-) rename externals/vma/{vma => VulkanMemoryAllocator} (100%) diff --git a/.gitmodules b/.gitmodules index cc0e97a85..5a8169b44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,6 +55,6 @@ [submodule "tzdb_to_nx"] path = externals/nx_tzdb/tzdb_to_nx url = https://github.com/lat9nq/tzdb_to_nx.git -[submodule "externals/vma/vma"] - path = externals/vma/vma +[submodule "VulkanMemoryAllocator"] + path = externals/vma/VulkanMemoryAllocator url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index ca4ebe4b9..0184289eb 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -145,7 +145,7 @@ add_subdirectory(nx_tzdb) # VMA add_library(vma vma/vma.cpp) -target_include_directories(vma PUBLIC ./vma/vma/include) +target_include_directories(vma PUBLIC ./vma/VulkanMemoryAllocator/include) target_link_libraries(vma PRIVATE Vulkan::Headers) if (NOT TARGET LLVM::Demangle) diff --git a/externals/vma/vma b/externals/vma/VulkanMemoryAllocator similarity index 100% rename from externals/vma/vma rename to externals/vma/VulkanMemoryAllocator diff --git a/externals/vma/vma.cpp b/externals/vma/vma.cpp index ff1acc320..1fe2cf52b 100644 --- a/externals/vma/vma.cpp +++ b/externals/vma/vma.cpp @@ -4,4 +4,5 @@ #define VMA_IMPLEMENTATION #define VMA_STATIC_VULKAN_FUNCTIONS 0 #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 + #include \ No newline at end of file diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 94dd1aa14..31226084f 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -22,8 +22,6 @@ #include #endif -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan { diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 70db41343..a2ef0efa4 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -15,8 +15,6 @@ #include "video_core/vulkan_common/vulkan_memory_allocator.h" #include "video_core/vulkan_common/vulkan_wrapper.h" -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan { diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index c01a9478e..28fcb21a0 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -12,8 +12,6 @@ #include "video_core/vulkan_common/vulkan_wrapper.h" -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan::vk {