From bb3b6ac6ebd60660049baaa0d61847b544b69b59 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 29 Jan 2024 22:50:31 +0800 Subject: fix runtime for meson --- xmake/modules/package/tools/meson.lua | 13 ++++++++++--- 1 file 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 -- cgit v1.3.1