diff options
| author | ruki <[email protected]> | 2023-12-03 23:02:41 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-03 23:02:41 +0800 |
| commit | ba071b3d6a6b41d2fa49126988fa9ef826e7a909 (patch) | |
| tree | 07c141c29a6935c94f5fb64fac260a21cc795abe | |
| parent | 51db2a04f6def44e67f23448d910da1777db3c48 (diff) | |
| parent | baa4b9e7c5bddd2d943b005ab8c05581aef044fd (diff) | |
Merge pull request #4467 from A2va/meson-correct-toolchain
Fix meson for mingw
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 635ca1a8d..70a616258 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -322,14 +322,13 @@ function _get_configs(package, configs, opt) end -- add cross file - if package:is_cross() then + if package:is_cross() or package:is_plat("mingw") then table.insert(configs, "--cross-file=" .. _get_configs_file(package, opt)) - else if package:config("toolchains") then + elseif package:config("toolchains") then if _is_toolchain_compatible_with_host(package) then table.insert(configs, "--native-file=" .. _get_configs_file(package, opt)) else - opt.cross = true - table.insert(configs, "--cross-file=" .. _get_configs_file(package, opt)) + table.insert(configs, "--cross-file=" .. _get_configs_file(package, table.join2(opt, {cross = true}))) end end |
