From 35801601a5044fa384b8f1a1e5c4f38f5d52249b Mon Sep 17 00:00:00 2001 From: Aiden Date: Fri, 22 May 2026 14:48:27 +1000 Subject: [PATCH] Cmake fixes --- CMakeLists.txt | 63 ++++++++++++++++++----------- tests/CMakeLists.txt | 94 ++++++++++++-------------------------------- 2 files changed, 67 insertions(+), 90 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a87c46..9b3c11f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,46 @@ function(add_video_shader_test name) add_test(NAME ${name} COMMAND ${name}) endfunction() +set(RUNTIME_JSON_SOURCES + "${SRC_DIR}/runtime/state/RuntimeJson.cpp" +) + +set(RUNTIME_PARAMETER_SOURCES + ${RUNTIME_JSON_SOURCES} + "${SRC_DIR}/runtime/state/RuntimeParameterUtils.cpp" +) + +set(RUNTIME_STATE_SOURCES + ${RUNTIME_JSON_SOURCES} + "${SRC_DIR}/runtime/state/RuntimeStatePersistence.cpp" +) + +set(RUNTIME_LAYER_SOURCES + "${SRC_DIR}/runtime/layers/RuntimeLayerModel.cpp" + "${SRC_DIR}/runtime/layers/RuntimeLayerReload.cpp" + "${SRC_DIR}/runtime/layers/RuntimeLayerSnapshot.cpp" + "${SRC_DIR}/runtime/layers/RuntimeLayerStateRestore.cpp" +) + +set(RUNTIME_TEXT_SOURCES + "${SRC_DIR}/runtime/text/FontAtlasBuilder.cpp" + "${SRC_DIR}/runtime/text/FontAtlasImageLoader.cpp" + "${SRC_DIR}/runtime/text/FontAtlasMetadata.cpp" + "${SRC_DIR}/runtime/text/FontAtlasProcess.cpp" + "${SRC_DIR}/runtime/text/RuntimeTextTextureComposer.cpp" +) + +set(RUNTIME_CATALOG_SOURCES + "${SRC_DIR}/runtime/catalog/SupportedShaderCatalog.cpp" +) + +set(SHADER_MANIFEST_SOURCES + "${SRC_DIR}/shader/ShaderManifestAssets.cpp" + "${SRC_DIR}/shader/ShaderManifestParameters.cpp" + "${SRC_DIR}/shader/ShaderManifestParser.cpp" + "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" +) + set(SLANG_RUNTIME_FILES "${SLANG_ROOT}/bin/slangc.exe" "${SLANG_ROOT}/bin/slang-compiler.dll" @@ -83,32 +123,11 @@ set(RENDER_CADENCE_APP_REQUIRED_FILES "${SRC_DIR}/RenderCadenceCompositor.cpp" "${SRC_DIR}/video/DeckLinkAPI_i.c" "${SRC_DIR}/video/DeckLinkAPI_h.h" - "${SRC_DIR}/video/DeckLinkDisplayMode.cpp" - "${SRC_DIR}/video/DeckLinkDisplayMode.h" - "${SRC_DIR}/video/DeckLinkSession.cpp" - "${SRC_DIR}/video/DeckLinkSession.h" - "${SRC_DIR}/video/DeckLinkVideoIOFormat.cpp" - "${SRC_DIR}/video/DeckLinkVideoIOFormat.h" - "${SRC_DIR}/video/VideoIOFormat.cpp" - "${SRC_DIR}/video/VideoIOFormat.h" - "${SRC_DIR}/video/VideoIOTypes.h" - "${SRC_DIR}/render/GLExtensions.cpp" - "${SRC_DIR}/render/GLExtensions.h" - "${SRC_DIR}/render/Std140Buffer.h" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.h" - "${SRC_DIR}/runtime/state/RuntimeParameterUtils.cpp" - "${SRC_DIR}/runtime/state/RuntimeParameterUtils.h" - "${SRC_DIR}/shader/ShaderCompiler.cpp" - "${SRC_DIR}/shader/ShaderCompiler.h" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.h" - "${SRC_DIR}/shader/ShaderTypes.h" ) video_shader_files_exist(RENDER_CADENCE_APP_MISSING_FILES ${RENDER_CADENCE_APP_REQUIRED_FILES}) if(RENDER_CADENCE_APP_MISSING_FILES) - message(STATUS "RenderCadenceCompositor target skipped; source reorganization has not provided these legacy shared files:") + message(STATUS "RenderCadenceCompositor target skipped; required app entry or external DeckLink SDK shim files are missing:") foreach(missing_file IN LISTS RENDER_CADENCE_APP_MISSING_FILES) message(STATUS " ${missing_file}") endforeach() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c65e707..5b2ee31 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,56 +40,32 @@ add_video_shader_test(RenderCadenceCompositorRuntimeShaderParamsTests ) add_video_shader_test(RenderCadenceCompositorRuntimeLayerModelTests - "${SRC_DIR}/runtime/text/FontAtlasBuilder.cpp" - "${SRC_DIR}/runtime/text/FontAtlasImageLoader.cpp" - "${SRC_DIR}/runtime/text/FontAtlasMetadata.cpp" - "${SRC_DIR}/runtime/text/FontAtlasProcess.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerModel.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerReload.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerSnapshot.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerStateRestore.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/state/RuntimeParameterUtils.cpp" - "${SRC_DIR}/runtime/text/RuntimeTextTextureComposer.cpp" - "${SRC_DIR}/runtime/catalog/SupportedShaderCatalog.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${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" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/state/RuntimeStatePersistence.cpp" + ${RUNTIME_STATE_SOURCES} "${TEST_DIR}/RuntimeStatePersistenceTests.cpp" ) add_video_shader_test(FontAtlasBuilderTests - "${SRC_DIR}/runtime/text/FontAtlasBuilder.cpp" - "${SRC_DIR}/runtime/text/FontAtlasImageLoader.cpp" - "${SRC_DIR}/runtime/text/FontAtlasMetadata.cpp" - "${SRC_DIR}/runtime/text/FontAtlasProcess.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${RUNTIME_TEXT_SOURCES} + ${RUNTIME_JSON_SOURCES} + ${SHADER_MANIFEST_SOURCES} "${TEST_DIR}/FontAtlasBuilderTests.cpp" ) add_video_shader_test(RenderCadenceCompositorSupportedShaderCatalogTests - "${SRC_DIR}/runtime/text/FontAtlasBuilder.cpp" - "${SRC_DIR}/runtime/text/FontAtlasImageLoader.cpp" - "${SRC_DIR}/runtime/text/FontAtlasMetadata.cpp" - "${SRC_DIR}/runtime/text/FontAtlasProcess.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/catalog/SupportedShaderCatalog.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${RUNTIME_TEXT_SOURCES} + ${RUNTIME_JSON_SOURCES} + ${RUNTIME_CATALOG_SOURCES} + ${SHADER_MANIFEST_SOURCES} "${TEST_DIR}/RenderCadenceCompositorSupportedShaderCatalogTests.cpp" ) @@ -97,22 +73,11 @@ add_video_shader_test(RenderCadenceCompositorRuntimeStateJsonTests "${SRC_DIR}/app/AppConfig.cpp" "${SRC_DIR}/app/AppConfigProvider.cpp" "${SRC_DIR}/json/JsonWriter.cpp" - "${SRC_DIR}/runtime/text/FontAtlasBuilder.cpp" - "${SRC_DIR}/runtime/text/FontAtlasImageLoader.cpp" - "${SRC_DIR}/runtime/text/FontAtlasMetadata.cpp" - "${SRC_DIR}/runtime/text/FontAtlasProcess.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerModel.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerReload.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerSnapshot.cpp" - "${SRC_DIR}/runtime/layers/RuntimeLayerStateRestore.cpp" - "${SRC_DIR}/runtime/state/RuntimeParameterUtils.cpp" - "${SRC_DIR}/runtime/text/RuntimeTextTextureComposer.cpp" - "${SRC_DIR}/runtime/catalog/SupportedShaderCatalog.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${RUNTIME_LAYER_SOURCES} + ${RUNTIME_TEXT_SOURCES} + ${RUNTIME_PARAMETER_SOURCES} + ${RUNTIME_CATALOG_SOURCES} + ${SHADER_MANIFEST_SOURCES} "${TEST_DIR}/RenderCadenceCompositorRuntimeStateJsonTests.cpp" ) @@ -123,7 +88,7 @@ add_video_shader_test(RenderCadenceCompositorHttpControlServerTests "${SRC_DIR}/control/http/HttpControlServerWebSocket.cpp" "${SRC_DIR}/json/JsonWriter.cpp" "${SRC_DIR}/logging/Logger.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" + ${RUNTIME_JSON_SOURCES} "${TEST_DIR}/RenderCadenceCompositorHttpControlServerTests.cpp" ) target_link_libraries(RenderCadenceCompositorHttpControlServerTests PRIVATE Ws2_32) @@ -131,37 +96,30 @@ target_link_libraries(RenderCadenceCompositorHttpControlServerTests PRIVATE Ws2_ add_video_shader_test(RenderCadenceCompositorAppConfigProviderTests "${SRC_DIR}/app/AppConfig.cpp" "${SRC_DIR}/app/AppConfigProvider.cpp" - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" + ${RUNTIME_JSON_SOURCES} "${TEST_DIR}/RenderCadenceCompositorAppConfigProviderTests.cpp" ) add_video_shader_test(RuntimeJsonTests - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" + ${RUNTIME_JSON_SOURCES} "${TEST_DIR}/RuntimeJsonTests.cpp" ) add_video_shader_test(RuntimeParameterUtilsTests - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/runtime/state/RuntimeParameterUtils.cpp" + ${RUNTIME_PARAMETER_SOURCES} "${TEST_DIR}/RuntimeParameterUtilsTests.cpp" ) add_video_shader_test(ShaderPackageRegistryTests - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${RUNTIME_JSON_SOURCES} + ${SHADER_MANIFEST_SOURCES} "${TEST_DIR}/ShaderPackageRegistryTests.cpp" ) add_video_shader_test(ShaderSlangValidationTests - "${SRC_DIR}/runtime/state/RuntimeJson.cpp" + ${RUNTIME_JSON_SOURCES} "${SRC_DIR}/shader/ShaderCompiler.cpp" - "${SRC_DIR}/shader/ShaderManifestAssets.cpp" - "${SRC_DIR}/shader/ShaderManifestParameters.cpp" - "${SRC_DIR}/shader/ShaderManifestParser.cpp" - "${SRC_DIR}/shader/ShaderPackageRegistry.cpp" + ${SHADER_MANIFEST_SOURCES} "${TEST_DIR}/ShaderSlangValidationTests.cpp" )