Files
XCEngine/MVS/RenderDoc/CMakeLists.txt
ssdfasd d58d98cb68 feat: add RenderDoc integration for D3D12 frame capture
- Add mvs/RenderDoc project with sphere rendering + RenderDoc capture
- Dynamic loading of renderdoc.dll without header dependencies
- Auto-capture frames 5-6 to .rdc file
- Copy sphere test resources (shaders, textures) via CMake
2026-03-23 03:28:49 +08:00

53 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.15)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
project(RenderDoc_Sphere)
set(ENGINE_ROOT_DIR ${CMAKE_SOURCE_DIR}/engine)
set(RENDERDOC_SDK_DIR ${CMAKE_SOURCE_DIR}/RenderDoc_1.43_64)
set(SPHERE_TEST_DIR ${CMAKE_SOURCE_DIR}/tests/RHI/D3D12/integration/sphere)
add_executable(RenderDoc_Sphere
WIN32
main.cpp
)
target_include_directories(RenderDoc_Sphere PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${ENGINE_ROOT_DIR}/include
${ENGINE_ROOT_DIR}
${RENDERDOC_SDK_DIR}
)
target_compile_definitions(RenderDoc_Sphere PRIVATE
UNICODE
_UNICODE
)
target_link_libraries(RenderDoc_Sphere PRIVATE
d3d12
dxgi
d3dcompiler
winmm
XCEngine
)
add_custom_command(TARGET RenderDoc_Sphere POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${SPHERE_TEST_DIR}/Res
$<TARGET_FILE_DIR:RenderDoc_Sphere>/Res
)
add_custom_command(TARGET RenderDoc_Sphere POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SPHERE_TEST_DIR}/GT.ppm
$<TARGET_FILE_DIR:RenderDoc_Sphere>/
)
add_custom_command(TARGET RenderDoc_Sphere POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${RENDERDOC_SDK_DIR}/renderdoc.dll
$<TARGET_FILE_DIR:RenderDoc_Sphere>/
)