diff options
| author | A2va <[email protected]> | 2023-12-03 12:39:30 +0100 |
|---|---|---|
| committer | A2va <[email protected]> | 2023-12-03 12:39:30 +0100 |
| commit | 69df00befdcb0f87314f18914bb1950ddb4606b6 (patch) | |
| tree | e4eeee2b4fbb905f6b149d66bff2977c469119cb | |
| parent | deae6419ab7da5071c6072c65bb9dac7ee942035 (diff) | |
Fix meson for mingw
Fix elseif statement
Avoid modify global opt
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 635ca1a8d..6351eeac1 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -324,12 +324,11 @@ function _get_configs(package, configs, opt) -- add cross file if package:is_cross() then table.insert(configs, "--cross-file=" .. _get_configs_file(package, opt)) - else if package:config("toolchains") then + elseif package:config("toolchains") or package:is_plat("mingw") 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 |
