summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEZ4Stephen <[email protected]>2026-07-01 19:28:29 +0400
committerGitHub <[email protected]>2026-07-01 19:28:29 +0400
commitbba5bfb2dd0c0e05f7a8647b8656949866cbdb0b (patch)
tree0b5d69ab69f2e2e7eaebafdd8800c484acbb37fe
parent0bd3b6b78c784a6a221865d95e71a3cd4fb62460 (diff)
Apply reviewer's fix
-rw-r--r--xmake/modules/package/tools/meson.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index c82b93f61..cbfa8328a 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -528,14 +528,14 @@ function buildenvs(package, opt)
local CMAKE_INCLUDE_PATH = {}
local CMAKE_PREFIX_PATH = {}
for _, dep in ipairs(package:librarydeps({private = true})) do
- local pkgconfig
+ local pkgconfigs = {path.join(dep:installdir(), "lib", "pkgconfig")}
if package:is_plat("bsd") then
- pkgconfig = path.join(dep:installdir(), "libdata", "pkgconfig")
- else
- pkgconfig = path.join(dep:installdir(), "lib", "pkgconfig")
+ table.insert(pkgconfigs, path.join(dep:installdir(), "libdata", "pkgconfig"))
end
- if os.isdir(pkgconfig) then
- table.insert(PKG_CONFIG_PATH, pkgconfig)
+ for _, pkgconfig in ipairs(pkgconfigs) do
+ if os.isdir(pkgconfig) then
+ table.insert(PKG_CONFIG_PATH, pkgconfig)
+ end
end
pkgconfig = path.join(dep:installdir(), "share", "pkgconfig")
if os.isdir(pkgconfig) then