diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 6e0c27d7e79..a756bc037a6 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -357,6 +357,17 @@ function _get_configs(package, configs, opt) elseif package:has_runtime("MDd") then table.insert(configs, "-Db_vscrt=mdd") end + else + local runtime = package:config("vs_runtime") + if runtime == "MT" then + table.insert(configs, "-Db_vscrt=mt") + elseif runtime == "MTd" then + table.insert(configs, "-Db_vscrt=mtd") + elseif runtime == "MD" then + table.insert(configs, "-Db_vscrt=md") + elseif runtime == "MDd" then + table.insert(configs, "-Db_vscrt=mdd") + end end -- add cross file