diff options
| author | xq114 <[email protected]> | 2023-02-17 09:38:45 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2023-02-17 09:38:45 +0800 |
| commit | 81dcdb846accbae3dc60803fe6af8a7375bdaafa (patch) | |
| tree | 606aa55db5cc12fb3301a1dbadb457805cf3c6cb /xmake/modules | |
| parent | a02e5791bfe8d2bcfc1bd91c731c9194beaaa136 (diff) | |
use package:is_cross
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 05e34883d..cdfbc7fb1 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -46,20 +46,6 @@ function _map_linkflags(package, targetkind, sourcekinds, name, values) return linker.map_flags(targetkind, sourcekinds, name, values, {target = package}) end --- is cross compilation? -function _is_cross_compilation(package) - if not package:is_plat(os.subhost()) then - return true - end - if package:is_plat("macosx") and not package:is_arch(os.subarch()) then - return true - end - if package:is_plat("windows") and not package:is_arch(os.arch()) then - return true - end - return false -end - -- get pkg-config function _get_pkgconfig(package) if package:is_plat("windows") then @@ -271,7 +257,7 @@ function _get_configs(package, configs, opt) end -- add cross file - if _is_cross_compilation(package) then + if package:is_cross() then table.insert(configs, "--cross-file=" .. _get_cross_file(package, opt)) end |
