# t5de-renderer.exe, the 64-bit renderer process, drawing with Diligent Engine.

include(FetchContent)

# Diligent Engine's core, pinned to an exact commit. Only the Direct3D 11 backend for now; the others (Direct3D 12,
# Vulkan for ray tracing and mesh shaders, WebGPU for browsers) are switched on as they're needed.
set(DILIGENT_NO_DIRECT3D12 ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_VULKAN ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_OPENGL ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_WEBGPU ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_ARCHIVER ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_SUPER_RESOLUTION ON CACHE BOOL "" FORCE)
set(DILIGENT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(DILIGENT_INSTALL_CORE OFF CACHE BOOL "" FORCE)
FetchContent_Declare(DiligentCore
    GIT_REPOSITORY https://github.com/DiligentGraphics/DiligentCore.git
    GIT_TAG c555e4d26de3f414eaf792fa16c0c24827619b17 # master, 2026-10-27
    GIT_SUBMODULES ThirdParty/xxHash
    EXCLUDE_FROM_ALL
    SYSTEM)
FetchContent_MakeAvailable(DiligentCore)

add_executable(t5de_renderer WIN32 main.cpp)
set_target_properties(t5de_renderer PROPERTIES OUTPUT_NAME t5de-renderer)
target_link_libraries(t5de_renderer PRIVATE t5de::protocol t5de::options Diligent-GraphicsEngineD3D11-static Diligent-Common)

install(TARGETS t5de_renderer RUNTIME DESTINATION .)
