summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/package/package.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index d5e82b13f..e271cc64c 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1391,6 +1391,19 @@ function _instance:config(name)
local configs = self:configs()
if configs then
value = configs[name]
+ -- vs_runtime is deprecated now
+ if name == "vs_runtime" then
+ local runtimes = configs.runtimes
+ if runtimes then
+ for _, item in ipairs(runtimes:split(",")) do
+ if item:startswith("MT") or item:startswith("MD") then
+ value = item
+ break
+ end
+ end
+ end
+ utils.warning("please use package:runtimes() or package:has_runtime() instead of package:config(\"vs_runtime\")")
+ end
end
return value
end