summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-08-27 07:47:08 +0800
committerGitHub <[email protected]>2021-08-27 07:47:08 +0800
commit9fe97a4b60768c3551ea2458d3c6b4284516edde (patch)
treed084b9b8dc2ff7eacc45fc7512b0cce1741a8015
parent2f8a54e11600d3384125ac495d6f1a8a971556a0 (diff)
Update package.lua
-rw-r--r--xmake/core/package/package.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index c032d9d83..50fd9148b 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1124,10 +1124,11 @@ function _instance:_fetch_tool(opt)
if fetchinfo == nil then
self._find_tool = self._find_tool or sandbox_module.import("lib.detect.find_tool", {anonymous = true})
if opt.system then
- local fetchnames = {self:name()}
+ local fetchnames = {}
if not self:is_thirdparty() then
table.join2(fetchnames, self:extsources())
end
+ table.insert(fetchnames, self:name())
for _, fetchname in ipairs(fetchnames) do
fetchinfo = self:find_tool(fetchname, opt)
if fetchinfo then
@@ -1180,10 +1181,11 @@ function _instance:_fetch_library(opt)
end
if fetchinfo == nil then
if opt.system then
- local fetchnames = {self:name()}
+ local fetchnames = {}
if not self:is_thirdparty() then
table.join2(fetchnames, self:extsources())
end
+ table.insert(fetchnames, self:name())
for _, fetchname in ipairs(fetchnames) do
fetchinfo = self:find_package(fetchname, opt)
if fetchinfo then