fix: temporarily disable utf8_range installation in gRPC configuration

- Added a workaround to prevent utf8_range export errors in gRPC 1.67.1 by disabling its installation.
- Set CMAKE_SKIP_INSTALL_RULES to TRUE during gRPC loading to avoid conflicts with Abseil installation settings.
- Re-enabled installation rules after gRPC is loaded to maintain proper build configuration.
This commit is contained in:
scawful
2025-11-07 07:58:59 -05:00
parent 43fff327d8
commit 57759ffeaf

View File

@@ -105,6 +105,12 @@ set(ABSL_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
set(ABSL_BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(utf8_range_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(utf8_range_INSTALL OFF CACHE BOOL "" FORCE)
set(utf8_range_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
# Temporarily disable installation to prevent utf8_range export errors
# This is a workaround for gRPC 1.67.1 where utf8_range tries to install targets
# that depend on Abseil, but we have ABSL_ENABLE_INSTALL=OFF
set(CMAKE_SKIP_INSTALL_RULES TRUE)
# Use CPM to fetch gRPC with bundled dependencies
# GIT_SUBMODULES "" disables submodule recursion since gRPC handles its own deps via CMake
@@ -117,6 +123,9 @@ CPMAddPackage(
GIT_SHALLOW TRUE
)
# Re-enable installation rules after gRPC is loaded
set(CMAKE_SKIP_INSTALL_RULES FALSE)
# Restore CPM lookup behaviour and toolchain detection environment early so
# subsequent dependency configuration isn't polluted even if we hit errors.
if("${_YAZE_GRPC_SAVED_CPM_USE_LOCAL_PACKAGES}" STREQUAL "__YAZE_UNSET__")