summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-29 22:50:31 +0800
committerruki <[email protected]>2024-01-29 22:50:31 +0800
commitbb3b6ac6ebd60660049baaa0d61847b544b69b59 (patch)
tree6849b1266efa5ff03aa4349612cde24c057e6310
parentcc654420c57b5c18e33b48962be963fc6a2bb857 (diff)
fix runtime for meson
-rw-r--r--xmake/modules/package/tools/meson.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index e4d740d16..5d023b7f3 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -317,9 +317,16 @@ function _get_configs(package, configs, opt)
end
-- add runtimes flags
- local runtimes = package:runtimes()
- if package:is_plat("windows") and runtimes then
- table.insert(configs, "-Db_vscrt=" .. runtimes:lower())
+ if package:is_plat("windows") then
+ if package:has_runtime("MT") then
+ table.insert(configs, "-Db_vscrt=MT")
+ elseif package:has_runtime("MTd") then
+ table.insert(configs, "-Db_vscrt=MTd")
+ elseif package:has_runtime("MD") then
+ table.insert(configs, "-Db_vscrt=MD")
+ elseif package:has_runtime("MDd") then
+ table.insert(configs, "-Db_vscrt=MDd")
+ end
end
-- add cross file