Enhance CMake configuration for improved stack management and utility separation

- Increased stack size for Windows builds to prevent stack overflow during asset loading and testing.
- Added separate executable for rom_patch_utility to enhance modularity and maintainability.
- Updated target link libraries for both extract_vanilla_values and rom_patch_utility to ensure proper dependencies are included.
- Added conditional checks to prevent building development-only utilities in CI environments.
This commit is contained in:
scawful
2025-09-29 15:38:27 -04:00
parent 7a14612f0e
commit ec42054da2
2 changed files with 53 additions and 5 deletions

View File

@@ -123,6 +123,15 @@ target_link_libraries(
ImGui
)
# Increase stack size on Windows to prevent stack overflow during asset loading
# Windows default is 1MB, macOS/Linux is typically 8MB
# LoadAssets() loads 223 graphics sheets and initializes multiple editors
if(MSVC)
target_link_options(yaze PRIVATE /STACK:8388608) # 8MB stack
elseif(MINGW)
target_link_options(yaze PRIVATE -Wl,--stack,8388608)
endif()
# Conditionally link ImGui Test Engine
if(YAZE_ENABLE_UI_TESTS)
if(TARGET ImGuiTestEngine)