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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user