From 00ed797627e25f96bbd9bb97c76bb5ab0e5783a2 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Fri, 10 Jan 2025 23:25:36 +0000 Subject: [PATCH] Meta/CMake: Use simple string match to find relevant vcpkg triplets Previously, the build would fail if the CMake source directory contained regex special characters. --- Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake index 4b217b6239d..02d87f51463 100644 --- a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake +++ b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake @@ -29,7 +29,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 - if (NOT VCPKG_OVERLAY_TRIPLETS MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") + string(FIND "${VCPKG_OVERLAY_TRIPLETS}" "${CMAKE_CURRENT_SOURCE_DIR}" VCPKG_OVERLAY_TRIPLETS_MATCH) + if (VCPKG_OVERLAY_TRIPLETS_MATCH EQUAL -1) return() endif()