diff options
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index f81bf2a0a..ea33e24fa 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -2721,14 +2721,17 @@ end -- function _instance:check_importfiles(names, opt) opt = opt or {} - if opt.configdirs == nil then - local configdirs = {} + if opt.PKG_CONFIG_PATH == nil then + local PKG_CONFIG_PATH = {} local linkdirs = table.wrap(self:get("linkdirs") or "lib") local installdir = self:installdir() for _, linkdir in ipairs(linkdirs) do - table.insert(configdirs, path.join(installdir, linkdir)) + table.insert(PKG_CONFIG_PATH, path.join(installdir, linkdir, "pkgconfig")) end - opt.configdirs = configdirs + opt.PKG_CONFIG_PATH = PKG_CONFIG_PATH + end + if opt.CMAKE_PREFIX_PATH == nil then + opt.CMAKE_PREFIX_PATH = self:installdir() end return sandbox_module.import("lib.detect.check_importfiles", {anonymous = true})(names or ("pkgconfig::" .. self:name()), opt) end |
