Files
XCEngine/tests/RHI/D3D12/unit/CMakeLists.txt

49 lines
1.0 KiB
CMake

cmake_minimum_required(VERSION 3.15)
get_filename_component(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. ABSOLUTE)
find_package(GTest REQUIRED)
set(TEST_SOURCES
fixtures/D3D12TestFixture.cpp
test_device.cpp
test_fence.cpp
test_command_queue.cpp
test_command_allocator.cpp
test_command_list.cpp
test_buffer.cpp
test_texture.cpp
test_descriptor_heap.cpp
test_shader.cpp
test_root_signature.cpp
test_pipeline_state.cpp
test_views.cpp
test_swap_chain.cpp
test_backend_specific.cpp
)
add_executable(rhi_d3d12_tests ${TEST_SOURCES})
target_link_libraries(rhi_d3d12_tests PRIVATE
d3d12
dxgi
d3dcompiler
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(rhi_d3d12_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/fixtures
${PROJECT_ROOT_DIR}/engine/include
${PROJECT_ROOT_DIR}/engine/src
)
if(MSVC)
target_compile_options(rhi_d3d12_tests PRIVATE /FS)
endif()
enable_testing()
include(GoogleTest)
gtest_discover_tests(rhi_d3d12_tests)