diff options
| author | ruki <[email protected]> | 2026-07-02 14:54:32 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-02 14:54:32 +0800 |
| commit | 57486069377ec952ab1e5e3288fa3d4d93d2131b (patch) | |
| tree | bd4e9824f591137deed0ac76f7015d8db6aaf5e4 | |
| parent | 88a9ac094fe5491c82fd887fafd434c9ea74f042 (diff) | |
| parent | bba5bfb2dd0c0e05f7a8647b8656949866cbdb0b (diff) | |
Merge pull request #7633 from EZ4Stephen/EZ4Stephen-patch-1
Fix pkgconfig path for bsd in meson.lua
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 11 |
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 |
