mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:49:04 +08:00
[vcpkg_configure_make] fix case sensitive comparison in PATH system d… (#34791)
* [vcpkg_configure_make] fix case sensitive comparison in PATH system dir search * Fixes after code review --------- Co-authored-by: Victor NIVET <vnivet@invoke.fr>
This commit is contained in:
parent
51aa787313
commit
9f03078bdc
@ -236,19 +236,12 @@ function(vcpkg_configure_make)
|
||||
cmake_path(CONVERT "$ENV{SystemRoot}" TO_CMAKE_PATH_LIST system_root NORMALIZE)
|
||||
cmake_path(CONVERT "$ENV{LOCALAPPDATA}" TO_CMAKE_PATH_LIST local_app_data NORMALIZE)
|
||||
file(REAL_PATH "${system_root}" system_root)
|
||||
string(TOUPPER "${system_root}" system_root_upper)
|
||||
|
||||
message(DEBUG "path_list:${path_list}") # Just to have --trace-expand output
|
||||
|
||||
vcpkg_list(SET find_system_dirs
|
||||
"${system_root}/system32"
|
||||
"${system_root}/System32"
|
||||
"${system_root}/system32/"
|
||||
"${system_root}/System32/"
|
||||
"${system_root_upper}/system32"
|
||||
"${system_root_upper}/System32"
|
||||
"${system_root_upper}/system32/"
|
||||
"${system_root_upper}/System32/"
|
||||
"${local_app_data}/Microsoft/WindowsApps"
|
||||
"${local_app_data}/Microsoft/WindowsApps/"
|
||||
)
|
||||
@ -258,7 +251,8 @@ function(vcpkg_configure_make)
|
||||
set(index 0)
|
||||
set(appending TRUE)
|
||||
foreach(item IN LISTS path_list)
|
||||
if(item IN_LIST find_system_dirs OR item IN_LIST find_system_dirs_upper)
|
||||
string(TOUPPER "${item}" item_upper)
|
||||
if(item_upper IN_LIST find_system_dirs_upper)
|
||||
set(appending FALSE)
|
||||
break()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user