Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve to get pkgconf for meson #5483

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions xmake/modules/package/tools/meson.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ end

-- get pkg-config, we need force to find it, because package install environments will be changed
function _get_pkgconfig(package)
-- meson need fullpath pkgconfig
-- @see https://github.com/xmake-io/xmake/issues/5474
local dep = package:dep("pkgconf") or package:dep("pkg-config")
if dep then
local suffix = dep:is_plat("windows", "mingw") and ".exe" or ""
local pkgconf = path.join(dep:installdir("bin"), "pkgconf" .. suffix)
if os.isfile(pkgconf) then
return pkgconf
end
local pkgconfig = path.join(dep:installdir("bin"), "pkg-config" .. suffix)
if os.isfile(pkgconfig) then
return pkgconfig
end
end
if package:is_plat("windows") then
local pkgconf = find_tool("pkgconf", {force = true})
if pkgconf then
Expand Down
Loading