chore: Enhance CMake and CI configurations for improved vcpkg integration

- Updated CMakeLists.txt to provide clearer logging and error messages for vcpkg integration, including detailed status reports for toolchain and triplet settings.
- Modified CI workflows to utilize manifest mode for vcpkg installations, improving dependency management and build reliability.
- Enhanced SDL2 and gRPC configurations to prioritize vcpkg packages, ensuring faster builds and clearer fallback mechanisms.
- Improved overall CMake structure for better readability and maintainability, including updated messages for build configurations and warnings.
This commit is contained in:
scawful
2025-10-09 10:22:11 -04:00
parent aac82ae12d
commit 45d1905469
6 changed files with 138 additions and 68 deletions

View File

@@ -6,12 +6,18 @@ set(YAZE_ABSL_GIT_TAG "20240116.2" CACHE STRING "Abseil release tag used when fe
# missing the required components (e.g. macOS).
set(_yaze_use_fetched_absl ${YAZE_FORCE_BUNDLED_ABSL})
if(NOT _yaze_use_fetched_absl)
find_package(absl QUIET CONFIG)
# Try to find via vcpkg first on Windows
if(WIN32 AND DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(absl CONFIG QUIET)
else()
find_package(absl QUIET CONFIG)
endif()
if(absl_FOUND)
message(STATUS "Using system-provided Abseil package")
message(STATUS "Using system/vcpkg Abseil package")
else()
set(_yaze_use_fetched_absl TRUE)
message(STATUS "System Abseil not found. Fetching release ${YAZE_ABSL_GIT_TAG}.")
message(STATUS "System Abseil not found. Will fetch release ${YAZE_ABSL_GIT_TAG}")
endif()
endif()