mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-22 04:00:05 +00:00
Fixes in CMakeLists.txt file
Added header files, added NATVIS file, added missing project dependencies.
This commit is contained in:
parent
a389d16fcf
commit
dd4f5e81ac
@ -1,7 +1,12 @@
|
|||||||
set(D3D12MA_LIBRARY_SOURCE_FILES
|
set(D3D12MA_LIBRARY_SOURCE_FILES
|
||||||
"../include/D3D12MemAlloc.h"
|
|
||||||
D3D12MemAlloc.cpp
|
D3D12MemAlloc.cpp
|
||||||
|
"${PROJECT_SOURCE_DIR}/include/D3D12MemAlloc.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(WIN32 AND ${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
||||||
|
set(D3D12MA_LIBRARY_SOURCE_FILES ${D3D12MA_LIBRARY_SOURCE_FILES} D3D12MemAlloc.natvis)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_DEBUG_POSTFIX d)
|
set(CMAKE_DEBUG_POSTFIX d)
|
||||||
set(CMAKE_RELWITHDEBINFO_POSTFIX rd)
|
set(CMAKE_RELWITHDEBINFO_POSTFIX rd)
|
||||||
set(CMAKE_MINSIZEREL_POSTFIX s)
|
set(CMAKE_MINSIZEREL_POSTFIX s)
|
||||||
@ -35,16 +40,18 @@ if(BUILD_SHARED_LIBS)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS D3D12MemoryAllocator DESTINATION lib)
|
install(TARGETS D3D12MemoryAllocator DESTINATION "lib")
|
||||||
install(FILES D3D12MemAlloc.h DESTINATION include)
|
install(FILES "${PROJECT_SOURCE_DIR}/include/D3D12MemAlloc.h" DESTINATION "include")
|
||||||
|
|
||||||
if (D3D12MA_BUILD_SAMPLE)
|
if(D3D12MA_BUILD_SAMPLE)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(SHADER_DIR "Shaders")
|
set(SHADER_DIR "Shaders")
|
||||||
|
|
||||||
set(D3D12_SAMPLE_SOURCE_FILES
|
set(D3D12_SAMPLE_SOURCE_FILES
|
||||||
Common.cpp
|
Common.cpp
|
||||||
|
Common.h
|
||||||
Tests.cpp
|
Tests.cpp
|
||||||
|
Tests.h
|
||||||
D3D12Sample.cpp
|
D3D12Sample.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -61,9 +68,9 @@ if (D3D12MA_BUILD_SAMPLE)
|
|||||||
${PIXEL_SHADERS}
|
${PIXEL_SHADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group( "Resources\\Shaders" FILES ${SHADERS} )
|
source_group("Resources\\Shaders" FILES ${SHADERS})
|
||||||
|
|
||||||
set_source_files_properties( ${VERTEX_SHADERS}
|
set_source_files_properties(${VERTEX_SHADERS}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VS_SHADER_TYPE Vertex
|
VS_SHADER_TYPE Vertex
|
||||||
VS_SETTINGS "ExcludedFromBuild=true"
|
VS_SETTINGS "ExcludedFromBuild=true"
|
||||||
@ -77,6 +84,8 @@ if (D3D12MA_BUILD_SAMPLE)
|
|||||||
|
|
||||||
add_executable(D3D12Sample ${D3D12_SAMPLE_SOURCE_FILES} ${SHADERS})
|
add_executable(D3D12Sample ${D3D12_SAMPLE_SOURCE_FILES} ${SHADERS})
|
||||||
|
|
||||||
|
add_dependencies(D3D12Sample D3D12MemoryAllocator)
|
||||||
|
|
||||||
# Visual Studio specific settings
|
# Visual Studio specific settings
|
||||||
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
||||||
# Use Unicode instead of multibyte set
|
# Use Unicode instead of multibyte set
|
||||||
|
Loading…
Reference in New Issue
Block a user