add_video_shader_test(RenderCadenceCompositorClockTests
	"${SRC_DIR}/render/RenderCadenceClock.cpp"
	"${TEST_DIR}/RenderCadenceCompositorClockTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorJsonWriterTests
	"${SRC_DIR}/json/JsonWriter.cpp"
	"${TEST_DIR}/RenderCadenceCompositorJsonWriterTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorLoggerTests
	"${SRC_DIR}/logging/Logger.cpp"
	"${TEST_DIR}/RenderCadenceCompositorLoggerTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorTelemetryTests
	"${SRC_DIR}/json/JsonWriter.cpp"
	"${TEST_DIR}/RenderCadenceCompositorTelemetryTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorFrameExchangeTests
	"${SRC_DIR}/frames/SystemFrameExchange.cpp"
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/RenderCadenceCompositorFrameExchangeTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorInputFrameMailboxTests
	"${SRC_DIR}/frames/InputFrameMailbox.cpp"
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/RenderCadenceCompositorInputFrameMailboxTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorPreviewConfigTests
	"${TEST_DIR}/RenderCadenceCompositorPreviewConfigTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorRuntimeShaderParamsTests
	"${SRC_DIR}/render/runtime/RuntimeShaderParams.cpp"
	"${TEST_DIR}/RenderCadenceCompositorRuntimeShaderParamsTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorRuntimeLayerModelTests
	${RUNTIME_LAYER_SOURCES}
	${RUNTIME_TEXT_SOURCES}
	${RUNTIME_PARAMETER_SOURCES}
	${RUNTIME_CATALOG_SOURCES}
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/RenderCadenceCompositorRuntimeLayerModelTests.cpp"
)

add_video_shader_test(RuntimeStatePersistenceTests
	"${SRC_DIR}/logging/Logger.cpp"
	${RUNTIME_STATE_SOURCES}
	"${TEST_DIR}/RuntimeStatePersistenceTests.cpp"
)

add_video_shader_test(FontAtlasBuilderTests
	${RUNTIME_TEXT_SOURCES}
	${RUNTIME_JSON_SOURCES}
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/FontAtlasBuilderTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorSupportedShaderCatalogTests
	${RUNTIME_TEXT_SOURCES}
	${RUNTIME_JSON_SOURCES}
	${RUNTIME_CATALOG_SOURCES}
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/RenderCadenceCompositorSupportedShaderCatalogTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorRuntimeStateJsonTests
	"${SRC_DIR}/app/AppConfig.cpp"
	"${SRC_DIR}/app/AppConfigProvider.cpp"
	"${SRC_DIR}/json/JsonWriter.cpp"
	${RUNTIME_LAYER_SOURCES}
	${RUNTIME_TEXT_SOURCES}
	${RUNTIME_PARAMETER_SOURCES}
	${RUNTIME_CATALOG_SOURCES}
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/RenderCadenceCompositorRuntimeStateJsonTests.cpp"
)

add_video_shader_test(RenderCadenceCompositorHttpControlServerTests
	"${SRC_DIR}/control/RuntimeControlCommand.cpp"
	"${SRC_DIR}/control/http/HttpControlServer.cpp"
	"${SRC_DIR}/control/http/HttpControlServerRoutes.cpp"
	"${SRC_DIR}/control/http/HttpControlServerWebSocket.cpp"
	"${SRC_DIR}/json/JsonWriter.cpp"
	"${SRC_DIR}/logging/Logger.cpp"
	${RUNTIME_JSON_SOURCES}
	"${TEST_DIR}/RenderCadenceCompositorHttpControlServerTests.cpp"
)
target_link_libraries(RenderCadenceCompositorHttpControlServerTests PRIVATE Ws2_32)

add_video_shader_test(RenderCadenceCompositorAppConfigProviderTests
	"${SRC_DIR}/app/AppConfig.cpp"
	"${SRC_DIR}/app/AppConfigProvider.cpp"
	${RUNTIME_JSON_SOURCES}
	"${TEST_DIR}/RenderCadenceCompositorAppConfigProviderTests.cpp"
)

add_video_shader_test(RuntimeJsonTests
	${RUNTIME_JSON_SOURCES}
	"${TEST_DIR}/RuntimeJsonTests.cpp"
)

add_video_shader_test(RuntimeParameterUtilsTests
	${RUNTIME_PARAMETER_SOURCES}
	"${TEST_DIR}/RuntimeParameterUtilsTests.cpp"
)

add_video_shader_test(ShaderPackageRegistryTests
	${RUNTIME_JSON_SOURCES}
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/ShaderPackageRegistryTests.cpp"
)

add_video_shader_test(ShaderSlangValidationTests
	${RUNTIME_JSON_SOURCES}
	"${SRC_DIR}/shader/ShaderCompiler.cpp"
	${SHADER_MANIFEST_SOURCES}
	"${TEST_DIR}/ShaderSlangValidationTests.cpp"
)

add_video_shader_test(Std140BufferTests
	"${TEST_DIR}/Std140BufferTests.cpp"
)

add_video_shader_test(VideoIOFormatTests
	"${SRC_DIR}/video/DeckLinkVideoIOFormat.cpp"
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/VideoIOFormatTests.cpp"
)

add_video_shader_test(VideoPlayoutSchedulerTests
	"${SRC_DIR}/video/VideoPlayoutScheduler.cpp"
	"${TEST_DIR}/VideoPlayoutSchedulerTests.cpp"
)

add_video_shader_test(VideoOutputThreadTests
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/VideoOutputThreadTests.cpp"
)

add_video_shader_test(OutputProductionControllerTests
	"${SRC_DIR}/video/OutputProductionController.cpp"
	"${TEST_DIR}/OutputProductionControllerTests.cpp"
)

add_video_shader_test(RenderOutputQueueTests
	"${SRC_DIR}/video/RenderOutputQueue.cpp"
	"${TEST_DIR}/RenderOutputQueueTests.cpp"
)

add_video_shader_test(RenderCadenceControllerTests
	"${SRC_DIR}/video/RenderCadenceController.cpp"
	"${TEST_DIR}/RenderCadenceControllerTests.cpp"
)

add_video_shader_test(SystemOutputFramePoolTests
	"${SRC_DIR}/video/SystemOutputFramePool.cpp"
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/SystemOutputFramePoolTests.cpp"
)

add_video_shader_test(VideoBackendLifecycleTests
	"${SRC_DIR}/video/VideoBackendLifecycle.cpp"
	"${TEST_DIR}/VideoBackendLifecycleTests.cpp"
)

add_video_shader_test(VideoIODeviceFakeTests
	"${SRC_DIR}/video/VideoIOFormat.cpp"
	"${TEST_DIR}/VideoIODeviceFakeTests.cpp"
)

set_tests_properties(RenderCadenceCompositorLoggerTests PROPERTIES
	ENVIRONMENT "VIDEO_SHADER_TEST_LOG_TO_CONSOLE=0"
)

set_tests_properties(ShaderSlangValidationTests PROPERTIES
	ENVIRONMENT "SLANG_ROOT=${SLANG_ROOT}"
)
