From ffd946d47d53aaced743f2851baf5bfaa4e20eb5 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 22 Jun 2025 12:51:45 -0600 Subject: [PATCH] CMake: Use cmake_path to check if vcpkg triplets are ours This makes the check work with possibly-normalized windows paths --- Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake index abe04fd1d67..88436155b65 100644 --- a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake +++ b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake @@ -33,8 +33,8 @@ if (NOT DEFINED CACHE{VCPKG_TARGET_TRIPLET} AND NOT DEFINED CACHE{VCPKG_HOST_TRI endif() # And then, only tweak settings if the triplets are ours - string(FIND "${VCPKG_OVERLAY_TRIPLETS}" "${CMAKE_CURRENT_SOURCE_DIR}" VCPKG_OVERLAY_TRIPLETS_MATCH) - if (VCPKG_OVERLAY_TRIPLETS_MATCH EQUAL -1) + cmake_path(IS_PREFIX CMAKE_CURRENT_SOURCE_DIR "${VCPKG_OVERLAY_TRIPLETS}" NORMALIZE TRIPLET_IS_OURS) + if (NOT TRIPLET_IS_OURS) return() endif()