diff options
| author | ruki <[email protected]> | 2024-02-22 23:33:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-22 23:33:06 +0800 |
| commit | add07b3a9316f96adbf7519e10cc2a7e52f3cd4f (patch) | |
| tree | 54a2378975294a0a31c79580e0ff8651788dff2f | |
| parent | c01407a8571338bba642dc38cceeff118ac6d671 (diff) | |
improve msvc envs
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index e302eaf98..5183f80c1 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -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 |
