summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua10
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