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.
This commit is contained in:
Tim Ledbetter 2025-01-10 23:25:36 +00:00 committed by Jelle Raaijmakers
parent 1e9e2b6564
commit 00ed797627
Notes: github-actions[bot] 2025-01-11 22:19:07 +00:00

View file

@ -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()