From 7063294c9d928f31955137a2720540d003696014 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 12 Oct 2025 00:31:29 -0400 Subject: [PATCH] refactor(cmake): enhance test linking for editor with additional support libraries - Updated CMake configuration to conditionally link the yaze_test_support library when tests are enabled, alongside the existing ImGuiTestEngine. - Improved status messages to provide clearer feedback on linked libraries during the build process. Benefits: - Enhanced testing capabilities for the editor by integrating additional support libraries. - Improved clarity in build output regarding linked test infrastructure. --- src/app/editor/editor_library.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/editor/editor_library.cmake b/src/app/editor/editor_library.cmake index af6b2de7..f5be0a51 100644 --- a/src/app/editor/editor_library.cmake +++ b/src/app/editor/editor_library.cmake @@ -120,11 +120,18 @@ if(YAZE_WITH_JSON) target_compile_definitions(yaze_editor PUBLIC YAZE_WITH_JSON) endif() -# Link ImGui Test Engine when tests are enabled +# Link test infrastructure when tests are enabled # The test infrastructure is integrated into the editor for test automation -if(YAZE_BUILD_TESTS AND TARGET ImGuiTestEngine) - target_link_libraries(yaze_editor PUBLIC ImGuiTestEngine) - message(STATUS "✓ yaze_editor linked to ImGuiTestEngine") +if(YAZE_BUILD_TESTS) + if(TARGET ImGuiTestEngine) + target_link_libraries(yaze_editor PUBLIC ImGuiTestEngine) + message(STATUS "✓ yaze_editor linked to ImGuiTestEngine") + endif() + + if(TARGET yaze_test_support) + target_link_libraries(yaze_editor PUBLIC yaze_test_support) + message(STATUS "✓ yaze_editor linked to yaze_test_support") + endif() endif() # Conditionally link gRPC if enabled