Use vcpkg for dependencies.

This commit is contained in:
Skyth
2024-10-17 01:04:21 +03:00
parent b7a3bdca87
commit 8e8ce8b42f
13 changed files with 76 additions and 74 deletions
+23 -15
View File
@@ -56,28 +56,36 @@ set(SWA_CXX_SOURCES
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES})
set_target_properties(UnleashedRecomp PROPERTIES OUTPUT_NAME ${TARGET_NAME})
target_link_libraries(UnleashedRecomp PUBLIC
UnleashedRecompLib
PowerUtils
o1heap
xxHash::xxhash
unordered_dense::unordered_dense
SDL2::SDL2-static
winmm
ntdll
find_package(d3d12-memory-allocator CONFIG REQUIRED)
find_package(SDL2 CONFIG REQUIRED)
find_package(unordered_dense CONFIG REQUIRED)
find_package(VulkanHeaders CONFIG)
find_package(volk CONFIG REQUIRED)
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
find_package(xxHash CONFIG REQUIRED)
target_link_libraries(UnleashedRecomp PRIVATE
comctl32
d3d12
dxgi
Vulkan::Headers
volk::volk
volk::volk_headers
GPUOpen::VulkanMemoryAllocator
ntdll
o1heap
PowerUtils
SDL2::SDL2-static
UnleashedRecompLib
unofficial::D3D12MemoryAllocator
unordered_dense::unordered_dense
winmm
xxHash::xxhash
)
target_include_directories(UnleashedRecomp PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${SWA_THIRDPARTY_ROOT}/ddspp
${SWA_THIRDPARTY_ROOT}/D3D12MemoryAllocator/include
${SWA_THIRDPARTY_ROOT}/D3D12MemoryAllocator/src
${SWA_THIRDPARTY_ROOT}/volk
${SWA_THIRDPARTY_ROOT}/Vulkan-Headers/include
${SWA_THIRDPARTY_ROOT}/VulkanMemoryAllocator/include
${SWA_THIRDPARTY_ROOT}/VulkanMemoryAllocator/src
)
target_precompile_headers(UnleashedRecomp PUBLIC ${SWA_PRECOMPILED_HEADERS})
+1 -3
View File
@@ -12,8 +12,6 @@
#pragma clang diagnostic ignored "-Wswitch"
#endif
#include "D3D12MemAlloc.cpp"
#ifdef __clang__
#pragma clang diagnostic pop
#endif
@@ -3307,7 +3305,7 @@ namespace RT64 {
D3D12MA::ALLOCATOR_DESC allocatorDesc = {};
allocatorDesc.pDevice = d3d;
allocatorDesc.pAdapter = adapter;
allocatorDesc.Flags = D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED | D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED | D3D12MA::ALLOCATOR_FLAG_DONT_PREFER_SMALL_BUFFERS_COMMITTED;
allocatorDesc.Flags = D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED | D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED;
res = D3D12MA::CreateAllocator(&allocatorDesc, &allocator);
if (FAILED(res)) {