summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/meson.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 5434ec7f6..cbfa8328a 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -528,9 +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 = path.join(dep:installdir(), "lib", "pkgconfig")
- if os.isdir(pkgconfig) then
- table.insert(PKG_CONFIG_PATH, pkgconfig)
+ local pkgconfigs = {path.join(dep:installdir(), "lib", "pkgconfig")}
+ if package:is_plat("bsd") then
+ table.insert(pkgconfigs, path.join(dep:installdir(), "libdata", "pkgconfig"))
+ end
+ 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