From 775a571f7546e2edb3cfa5a8fde597bc8ef93cfb Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 6 Apr 2024 11:08:17 +0000 Subject: [PATCH] build: fix detecting Visual Studio default vcpkg Make the regular expression against VCPKG_ROOT less specific for detecting the default Visual Studio vcpkg, for some reason it stopped working. Signed-off-by: Rafael Kitover --- cmake/Set-Toolchain-vcpkg.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index 790d603f..32cca3bc 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -53,7 +53,7 @@ endif() function(vcpkg_check_git_status git_status) # The VS vcpkg component cannot be written to without elevation. - if(NOT git_status EQUAL 0 AND NOT VCPKG_ROOT MATCHES "^C:/Program Files/Microsoft Visual Studio/") + if(NOT git_status EQUAL 0 AND NOT VCPKG_ROOT MATCHES "Visual Studio") message(FATAL_ERROR "Error updating vcpkg from git, please make sure git for windows is installed correctly, it can be installed from Visual Studio components") endif() endfunction() @@ -120,7 +120,7 @@ function(vcpkg_is_installed vcpkg_exe pkg_name pkg_ver pkg_triplet powershell ou string(REPLACE "-" "." pkg_ver ${pkg_ver}) if(NOT DEFINED VCPKG_INSTALLED_COUNT) - if(VCPKG_ROOT MATCHES "^C:/Program Files/Microsoft Visual Studio/") + if(VCPKG_ROOT MATCHES "Visual Studio") execute_process( COMMAND ${powershell} -executionpolicy bypass -noprofile