diff options
| author | ruki <[email protected]> | 2024-02-22 23:32:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-22 23:32:34 +0800 |
| commit | c01407a8571338bba642dc38cceeff118ac6d671 (patch) | |
| tree | bd2d3e3ea1ce1bb0b658934501beca9da1980a6e | |
| parent | 48ab510f950e4e9b9b5568665d37f658220cb032 (diff) | |
improve msvc envs
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 4c73cd5d1..e302eaf98 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -93,7 +93,15 @@ end -- get msvc run environments function _get_msvc_runenvs(package) - return os.joinenvs(_get_msvc(package):runenvs()) + 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 + else + envs[k] = v + end + end + return envs end -- get vs arch |
