diff --git a/src/app/app.cmake b/src/app/app.cmake index 7a7a1793..7ec27985 100644 --- a/src/app/app.cmake +++ b/src/app/app.cmake @@ -41,7 +41,10 @@ target_link_libraries(yaze PRIVATE absl::flags_parse ) -# Note: yaze gets yaze_test_support transitively through yaze_editor when tests are enabled +# Link test support if tests are enabled (yaze_editor needs TestManager) +if(YAZE_BUILD_TESTS AND TARGET yaze_test_support) + target_link_libraries(yaze PRIVATE yaze_test_support) +endif() # Platform-specific settings if(WIN32) diff --git a/src/app/emu/emu.cmake b/src/app/emu/emu.cmake index e159fa5c..733463dd 100644 --- a/src/app/emu/emu.cmake +++ b/src/app/emu/emu.cmake @@ -26,6 +26,11 @@ if(YAZE_BUILD_EMU AND NOT YAZE_MINIMAL_BUILD) absl::failure_signal_handler ) + # Link test support if tests are enabled (yaze_editor needs TestManager) + if(YAZE_BUILD_TESTS AND TARGET yaze_test_support) + target_link_libraries(yaze_emu PRIVATE yaze_test_support) + endif() + if(YAZE_ENABLE_UI_TESTS) target_compile_definitions(yaze_emu PRIVATE YAZE_ENABLE_IMGUI_TEST_ENGINE=1) endif()