summaryrefslogtreecommitdiff
path: root/xmake/actions/require
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-12 23:56:41 +0800
committerruki <[email protected]>2018-09-12 17:40:08 +0800
commit18f193ed0b7da9eaa2d62794de30a0a923776616 (patch)
treee5fae313fb889da96a2fb562e716ebec6c61f226 /xmake/actions/require
parentd5bbf65a46f53058816081631fafc015bce83ba3 (diff)
improve to install package
Diffstat (limited to 'xmake/actions/require')
-rw-r--r--xmake/actions/require/action/install.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/actions/require/action/install.lua b/xmake/actions/require/action/install.lua
index a270b538c..123521004 100644
--- a/xmake/actions/require/action/install.lua
+++ b/xmake/actions/require/action/install.lua
@@ -56,15 +56,15 @@ function _make_package(package)
-- get links
local links = {}
for _, filename in ipairs(os.files(path.join(linkdir, target.filename("*", "static"))), path.filename) do
- local link, count = filename:gsub(target.filename("([%%w%%-_]+)", "static"):gsub("%.", "%%.") .. "$", "%1")
- if count > 0 then
+ local link = target.linkname(filename)
+ if link then
table.insert(links, link)
end
end
if #links == 0 then
for _, filename in ipairs(os.files(path.join(linkdir, target.filename("*", "shared"))), path.filename) do
- local link, count = filename:gsub(target.filename("([%%w%%-_]+)", "shared"):gsub("%.", "%%.") .. "$", "%1")
- if count > 0 then
+ local link = target.linkname(filename)
+ if link then
table.insert(links, link)
end
end