feat(cmake): enhance OpenSSL linking and whole-archive options for Windows
- Updated CMake configurations to conditionally link OpenSSL only when gRPC is not enabled, preventing duplicate symbol errors. - Added support for whole-archive linking of protobuf on Windows across core, net, agent, and z3ed components to ensure all symbols are included. - Improved status messages to reflect the use of gRPC's OpenSSL when applicable. Benefits: - Enhanced compatibility and stability of the build process across different platforms and configurations.
This commit is contained in:
@@ -40,4 +40,9 @@ endif()
|
||||
if(YAZE_WITH_GRPC)
|
||||
message(STATUS "Adding gRPC support to z3ed CLI")
|
||||
target_link_libraries(z3ed PRIVATE grpc++ grpc++_reflection libprotobuf)
|
||||
|
||||
# On Windows, force whole-archive linking for protobuf to ensure all symbols are included
|
||||
if(MSVC)
|
||||
target_link_options(z3ed PRIVATE /WHOLEARCHIVE:libprotobuf)
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user