chore(cmake): link test support conditionally for yaze and yaze_emu
- Added conditional linkage of the yaze_test_support library for both yaze and yaze_emu targets when tests are enabled, ensuring proper integration with TestManager. - This change enhances the modularity of the CMake configuration by managing test dependencies more effectively. Benefits: - Improved organization of test support linkage in the CMake configuration. - Enhanced maintainability by ensuring that test dependencies are only included when necessary.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user