chore(cmake): enhance test support linkage and file dialog functionality

- Improved the CMake configuration to conditionally link the yaze_test_support library for the yaze target when tests are enabled, providing clearer feedback on linkage status.
- Updated the file dialog implementation to include specific filters for ROM files and all files, enhancing user experience during file selection.
- Added status messages to inform users about the linkage of test support and potential issues if the target is not found.

Benefits:
- Enhanced clarity and maintainability of the CMake configuration.
- Improved user interaction with file dialogs through better filtering options.
This commit is contained in:
scawful
2025-10-11 13:29:24 -04:00
parent 88a4f29fe8
commit e523ce94da
3 changed files with 16 additions and 12 deletions

View File

@@ -51,11 +51,9 @@ else()
message(STATUS "○ z3ed test suites disabled (yaze_agent not built)")
endif()
# Link yaze_editor back to yaze_test_support (for TestManager usage in editor_manager.cc)
# Use PRIVATE linkage to avoid propagating test dependencies to editor consumers
if(TARGET yaze_editor)
target_link_libraries(yaze_editor PRIVATE yaze_test_support)
message(STATUS "✓ yaze_editor linked to yaze_test_support for TestManager access")
endif()
message(STATUS "✓ yaze_test_support library configured")
message(STATUS "✓ yaze_test_support library configured")
# Note: yaze_editor needs yaze_test_support for TestManager, but we can't link it here
# because this happens BEFORE yaze and yaze_emu are configured.
# Instead, each executable (yaze, yaze_emu) must explicitly link yaze_test_support
# in their respective .cmake files (app.cmake, emu.cmake).