Skip to content

Commit

Permalink
improve msvc envs
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Feb 22, 2024
1 parent c01407a commit add07b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ end
function _get_msvc_runenvs(package)
local envs = {}
for k, v in pairs(os.joinenvs(_get_msvc(package):runenvs())) do
if k:upper() ~= k and os.getenv(k:upper()) then
envs[k:upper()] = v
local k_upper = k:upper()
local k_lower = k:lower()
if k_upper ~= k and os.getenv(k_upper) then
envs[k_upper] = v
elseif k_lower ~= k and os.getenv(k_lower) then
envs[k_lower] = v
else
envs[k] = v
end
Expand Down

0 comments on commit add07b3

Please sign in to comment.