Fixes in CMakeLists.txt files

Added header files, added NATVIS file, added missing project dependencies.
This commit is contained in:
Adam Sawicki 2021-12-07 16:48:59 +01:00
parent d3067c3620
commit 5c8b3ba955
2 changed files with 19 additions and 5 deletions

View File

@ -1,7 +1,14 @@
set(VMA_LIBRARY_SOURCE_FILES
VmaUsage.cpp
VmaUsage.h
"${PROJECT_SOURCE_DIR}/include/vk_mem_alloc.h"
)
# Visual Studio only debugger symbols
if(WIN32 AND ${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
set(VMA_LIBRARY_SOURCE_FILES ${VMA_LIBRARY_SOURCE_FILES} vk_mem_alloc.natvis)
endif()
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_RELWITHDEBINFO_POSTFIX rd)
set(CMAKE_MINSIZEREL_POSTFIX s)
@ -38,19 +45,22 @@ target_compile_definitions(
)
install(TARGETS VulkanMemoryAllocator DESTINATION "lib")
install(FILES "../include/vk_mem_alloc.h" DESTINATION "include")
install(FILES "${PROJECT_SOURCE_DIR}/include/vk_mem_alloc.h" DESTINATION "include")
if(VMA_BUILD_SAMPLE)
if(WIN32)
set(VMA_SAMPLE_SOURCE_FILES
Common.cpp
Common.h
SparseBindingTest.cpp
SparseBindingTest.h
Tests.cpp
Tests.h
VulkanSample.cpp
)
add_executable(VmaSample ${VMA_SAMPLE_SOURCE_FILES})
add_dependencies(VmaSample VmaSampleShaders)
add_dependencies(VmaSample VulkanMemoryAllocator VmaSampleShaders)
# Visual Studio specific settings
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")

View File

@ -3,12 +3,16 @@
if (WIN32)
set(VMA_REPLAY_SOURCE_FILES
Common.cpp
Common.h
Constants.cpp
VmaReplay.cpp
Constants.h
VmaUsage.cpp
VmaUsage.h
VmaReplay.cpp
)
add_executable(VmaReplay ${VMA_REPLAY_SOURCE_FILES})
add_dependencies(VmaReplay VulkanMemoryAllocator)
# Enable multithreaded compiling
target_compile_options(VmaReplay PRIVATE "/MP")