Skip to content

Commit

Permalink
Meta/CMake: Use simple string match to find relevant vcpkg triplets
Browse files Browse the repository at this point in the history
Previously, the build would fail if the CMake source directory
contained regex special characters.
  • Loading branch information
tcl3 authored and gmta committed Jan 11, 2025
1 parent 1e9e2b6 commit 00ed797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 00ed797

Please sign in to comment.