diff options
| author | ruki <[email protected]> | 2023-08-14 23:51:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-14 23:51:12 +0800 |
| commit | e68642b96593b3529ce1e29fac0fc600b0ce5e8c (patch) | |
| tree | f4e424219345eb3d9d1f9302fed64c82679cd126 | |
| parent | 28702540d05e272daa4e4610cb292444d597a914 (diff) | |
improve pkgconf for meson
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 276b63346..6527a2e2b 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -47,15 +47,15 @@ function _map_linkflags(package, targetkind, sourcekinds, name, values) return linker.map_flags(targetkind, sourcekinds, name, values, {target = package}) end --- get pkg-config +-- get pkg-config, we need force to find it, because package install environments will be changed function _get_pkgconfig(package) if package:is_plat("windows") then - local pkgconf = find_tool("pkgconf") + local pkgconf = find_tool("pkgconf", {force = true}) if pkgconf then return pkgconf.program end end - local pkgconfig = find_tool("pkg-config") + local pkgconfig = find_tool("pkg-config", {force = true}) if pkgconfig then return pkgconfig.program end @@ -388,9 +388,9 @@ function buildenvs(package, opt) envs.SHFLAGS = table.concat(shflags, ' ') if package:is_plat("windows") then envs = os.joinenvs(envs, _get_msvc_runenvs(package)) - local pkgconf = find_tool("pkgconf") + local pkgconf = _get_pkgconfig(package) if pkgconf then - envs.PKG_CONFIG = pkgconf.program + envs.PKG_CONFIG = pkgconf end end end |
