Forced gRPC’s bundled dependencies (protobuf + Abseil + gRPC itself) to honor the static MSVC runtime

This commit is contained in:
scawful
2025-10-14 10:42:38 -04:00
parent f6c5ace099
commit e9e574cffc

View File

@@ -92,11 +92,14 @@ set(protobuf_BUILD_CONFORMANCE OFF CACHE BOOL "" FORCE)
set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "" FORCE)
set(protobuf_WITH_ZLIB ON CACHE BOOL "" FORCE)
set(protobuf_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE)
# Abseil configuration
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
set(ABSL_ENABLE_INSTALL ON CACHE BOOL "" FORCE)
set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(ABSL_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE)
set(gRPC_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE)
# Disable x86-specific optimizations for ARM64 macOS builds
if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")