64 lines
2.0 KiB
CMake
64 lines
2.0 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
project(rendering_integration_post_process_scene)
|
|
|
|
set(ENGINE_ROOT_DIR ${CMAKE_SOURCE_DIR}/engine)
|
|
set(PACKAGE_DIR ${CMAKE_SOURCE_DIR}/mvs/OpenGL/package)
|
|
|
|
get_filename_component(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. ABSOLUTE)
|
|
|
|
find_package(Vulkan QUIET)
|
|
|
|
add_executable(rendering_integration_post_process_scene
|
|
main.cpp
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/fixtures/RHIIntegrationFixture.cpp
|
|
${PACKAGE_DIR}/src/glad.c
|
|
)
|
|
|
|
target_include_directories(rendering_integration_post_process_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_post_process_scene PRIVATE
|
|
d3d12
|
|
dxgi
|
|
d3dcompiler
|
|
winmm
|
|
opengl32
|
|
XCEngine
|
|
GTest::gtest
|
|
)
|
|
|
|
if(TARGET Vulkan::Vulkan)
|
|
target_link_libraries(rendering_integration_post_process_scene PRIVATE Vulkan::Vulkan)
|
|
target_compile_definitions(rendering_integration_post_process_scene PRIVATE XCENGINE_SUPPORT_VULKAN)
|
|
endif()
|
|
|
|
target_compile_definitions(rendering_integration_post_process_scene PRIVATE
|
|
UNICODE
|
|
_UNICODE
|
|
XCENGINE_SUPPORT_OPENGL
|
|
XCENGINE_SUPPORT_D3D12
|
|
)
|
|
|
|
add_custom_command(TARGET rendering_integration_post_process_scene POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_SOURCE_DIR}/tests/RHI/integration/compare_ppm.py
|
|
$<TARGET_FILE_DIR:rendering_integration_post_process_scene>/
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
|
$<TARGET_FILE_DIR:rendering_integration_post_process_scene>/GT.ppm
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${ENGINE_ROOT_DIR}/third_party/renderdoc/renderdoc.dll
|
|
$<TARGET_FILE_DIR:rendering_integration_post_process_scene>/
|
|
)
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(rendering_integration_post_process_scene)
|