chore: update protobuf linking strategy for Windows

- Adjusted CMake files to conditionally link protobuf using /WHOLEARCHIVE on Windows to include internal symbols while avoiding LNK1241 errors.
- Updated linking logic for `yaze`, `yaze_editor`, `yaze_emu`, `z3ed`, and test suites to ensure compatibility across platforms.

Benefits:
- Improves build stability and compatibility for Windows users by ensuring proper symbol inclusion without resource duplication issues.
This commit is contained in:
scawful
2025-10-18 12:01:12 -04:00
parent 5894809aaf
commit 51cf1681e5
10 changed files with 44 additions and 32 deletions

View File

@@ -167,9 +167,10 @@ if(YAZE_WITH_GRPC)
grpc++
grpc++_reflection
)
if(YAZE_PROTOBUF_TARGETS)
# NOTE: Do NOT link protobuf at library level on Windows - causes LNK1241
# Executables will link it with /WHOLEARCHIVE to include internal symbols
if(NOT WIN32 AND YAZE_PROTOBUF_TARGETS)
target_link_libraries(yaze_editor PRIVATE ${YAZE_PROTOBUF_TARGETS})
# NOTE: Removed /WHOLEARCHIVE for protobuf - causes duplicate version.res in dependency chain
endif()
endif()

View File

@@ -154,9 +154,7 @@ void OverworldEditor::Initialize() {
entity_renderer_ = std::make_unique<OverworldEntityRenderer>(
&overworld_, &ow_map_canvas_, &sprite_previews_);
// Setup Canvas Automation API callbacks (Phase 4)
SetupCanvasAutomation();
}
absl::Status OverworldEditor::Load() {