- Rename D3D12Enum.h to D3D12Enums.h for naming consistency - Fix OpenGL unit test GLAD initialization by using gladLoadGL() instead of gladLoadGLLoader(wglGetProcAddress) for fallback support - Migrate remaining tests to use gtest_discover_tests for granular test discovery (math, core, containers, memory, threading, debug, components, scene, resources, input, opengl) - Remove obsolete TEST_RESOURCES_DIR and copy_directory commands from OpenGL unit test CMakeLists (minimal/Res doesn't exist) - Update TEST_SPEC.md with performance metrics and per-module build/test commands for faster development workflow - Update CMake path references to use lowercase paths
60 lines
1.5 KiB
CMake
60 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
project(D3D12_Quad)
|
|
|
|
set(ENGINE_ROOT_DIR ${CMAKE_SOURCE_DIR}/engine)
|
|
|
|
add_executable(D3D12_Quad
|
|
WIN32
|
|
main.cpp
|
|
)
|
|
|
|
set_target_properties(D3D12_Quad PROPERTIES LINK_FLAGS "/INCREMENTAL:NO")
|
|
|
|
target_include_directories(D3D12_Quad PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${ENGINE_ROOT_DIR}/include
|
|
${ENGINE_ROOT_DIR}
|
|
)
|
|
|
|
target_compile_definitions(D3D12_Quad PRIVATE
|
|
UNICODE
|
|
_UNICODE
|
|
)
|
|
|
|
target_link_libraries(D3D12_Quad PRIVATE
|
|
d3d12
|
|
dxgi
|
|
d3dcompiler
|
|
winmm
|
|
XCEngine
|
|
)
|
|
|
|
add_custom_command(TARGET D3D12_Quad POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Res
|
|
$<TARGET_FILE_DIR:D3D12_Quad>/Res
|
|
)
|
|
|
|
add_custom_command(TARGET D3D12_Quad POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_SOURCE_DIR}/tests/rhi/d3d12/integration/compare_ppm.py
|
|
$<TARGET_FILE_DIR:D3D12_Quad>/
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_SOURCE_DIR}/tests/rhi/d3d12/integration/run_integration_test.py
|
|
$<TARGET_FILE_DIR:D3D12_Quad>/
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
|
$<TARGET_FILE_DIR:D3D12_Quad>/
|
|
)
|
|
|
|
add_test(NAME D3D12_Quad_Integration
|
|
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE_DIR:D3D12_Quad>/run_integration_test.py
|
|
$<TARGET_FILE:D3D12_Quad>
|
|
quad.ppm
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
|
0
|
|
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Quad>
|
|
) |