fix(build): update protobuf linking for Windows in CMake files

- Modified CMake configurations across multiple files to use `$<TARGET_FILE:libprotobuf>` for whole-archive linking on Windows, ensuring all symbols are included correctly.
- This change enhances compatibility and reliability of the build process when using gRPC.

Benefits:
- Improves build stability on Windows platforms by ensuring proper linking of the protobuf library.
This commit is contained in:
scawful
2025-10-13 14:26:06 -04:00
parent dcbfc0173c
commit cc427d037e
5 changed files with 5 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ if(YAZE_BUILD_TESTS)
target_link_options(${suite_name} PRIVATE /STACK:16777216)
# Force whole-archive linking for protobuf to ensure all symbols are included
if(YAZE_WITH_GRPC)
target_link_options(${suite_name} PRIVATE /WHOLEARCHIVE:libprotobuf)
target_link_options(${suite_name} PRIVATE /WHOLEARCHIVE:$<TARGET_FILE:libprotobuf>)
endif()
else()
target_link_options(${suite_name} PRIVATE -Wl,--stack,16777216)