refactor(build): enhance CMake configurations for protobuf integration
- Updated CMake files to conditionally link against libprotobuf based on the YAZE_PROTOBUF_TARGET variable across various modules (core, net, agent, z3ed). - Ensured consistent use of the static MSVC runtime to align with vcpkg static triplets. - Improved clarity in build logs by adding status messages for whole-archive linking conditions. Benefits: - Enhances modularity and compatibility of the build system with protobuf. - Streamlines the build process for different platforms by ensuring appropriate linking based on configuration options.
This commit is contained in:
@@ -85,6 +85,14 @@ if(NOT YAZE_WITH_GRPC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET protobuf::libprotobuf)
|
||||
set(YAZE_PROTOBUF_TARGET protobuf::libprotobuf)
|
||||
elseif(TARGET libprotobuf)
|
||||
set(YAZE_PROTOBUF_TARGET libprotobuf)
|
||||
else()
|
||||
set(YAZE_PROTOBUF_TARGET "")
|
||||
endif()
|
||||
|
||||
# SDL2
|
||||
include(cmake/sdl2.cmake)
|
||||
|
||||
@@ -135,4 +143,3 @@ endif()
|
||||
|
||||
# httplib (header only)
|
||||
# No action needed here as it's included directly.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user