Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg_configure_make] fix case sensitive comparison in PATH system d… #34791

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions scripts/cmake/vcpkg_configure_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
)
Expand All @@ -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()
Expand Down