63 lines
2.1 KiB
CMake
63 lines
2.1 KiB
CMake
|
|
cmake_minimum_required(VERSION 3.15)
|
||
|
|
|
||
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||
|
|
|
||
|
|
project(rendering_integration_backpack_scene)
|
||
|
|
|
||
|
|
set(ENGINE_ROOT_DIR ${CMAKE_SOURCE_DIR}/engine)
|
||
|
|
set(PACKAGE_DIR ${CMAKE_SOURCE_DIR}/tests/opengl/package)
|
||
|
|
|
||
|
|
get_filename_component(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. ABSOLUTE)
|
||
|
|
|
||
|
|
add_executable(rendering_integration_backpack_scene
|
||
|
|
main.cpp
|
||
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/fixtures/RHIIntegrationFixture.cpp
|
||
|
|
${PACKAGE_DIR}/src/glad.c
|
||
|
|
)
|
||
|
|
|
||
|
|
target_include_directories(rendering_integration_backpack_scene PRIVATE
|
||
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/fixtures
|
||
|
|
${ENGINE_ROOT_DIR}/include
|
||
|
|
${PACKAGE_DIR}/include
|
||
|
|
${PROJECT_ROOT_DIR}/engine/src
|
||
|
|
)
|
||
|
|
|
||
|
|
target_link_libraries(rendering_integration_backpack_scene PRIVATE
|
||
|
|
d3d12
|
||
|
|
dxgi
|
||
|
|
d3dcompiler
|
||
|
|
winmm
|
||
|
|
opengl32
|
||
|
|
XCEngine
|
||
|
|
GTest::gtest
|
||
|
|
)
|
||
|
|
|
||
|
|
target_compile_definitions(rendering_integration_backpack_scene PRIVATE
|
||
|
|
UNICODE
|
||
|
|
_UNICODE
|
||
|
|
XCENGINE_SUPPORT_OPENGL
|
||
|
|
XCENGINE_SUPPORT_D3D12
|
||
|
|
)
|
||
|
|
|
||
|
|
add_custom_command(TARGET rendering_integration_backpack_scene POST_BUILD
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/backpack/Res
|
||
|
|
$<TARGET_FILE_DIR:rendering_integration_backpack_scene>/Res
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/compare_ppm.py
|
||
|
|
$<TARGET_FILE_DIR:rendering_integration_backpack_scene>/
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/backpack/GT.ppm
|
||
|
|
$<TARGET_FILE_DIR:rendering_integration_backpack_scene>/GT.ppm
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
${ENGINE_ROOT_DIR}/third_party/renderdoc/renderdoc.dll
|
||
|
|
$<TARGET_FILE_DIR:rendering_integration_backpack_scene>/
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
${ENGINE_ROOT_DIR}/third_party/assimp/bin/assimp-vc143-mt.dll
|
||
|
|
$<TARGET_FILE_DIR:rendering_integration_backpack_scene>/
|
||
|
|
)
|
||
|
|
|
||
|
|
include(GoogleTest)
|
||
|
|
gtest_discover_tests(rendering_integration_backpack_scene)
|