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:
@@ -9,8 +9,8 @@ set(CMAKE_POLICY_VERSION_MINIMUM 3.5 CACHE STRING "Minimum policy version for su
|
||||
# Set policies for compatibility
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
|
||||
# Ensure we consistently use the dynamic MSVC runtime (/MD, /MDd) even when cached
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" CACHE STRING "" FORCE)
|
||||
# Ensure we consistently use the static MSVC runtime (/MT, /MTd) to match vcpkg static triplets
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "" FORCE)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user