diff options
| author | ruki <[email protected]> | 2021-08-21 00:07:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-21 00:07:26 +0800 |
| commit | bc582fd4bdaee3add88a4e15f1764c7e11eec41c (patch) | |
| tree | 9fa03b88c7a3ba03f3df82150237954ab5f01f08 /xmake/modules/package | |
| parent | a226ce07d85f3aab66b6dacf6f91e85f7296a490 (diff) | |
improve installation
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/manager/xmake/find_package.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua index a44744ad2..0b043cc2f 100644 --- a/xmake/modules/package/manager/xmake/find_package.lua +++ b/xmake/modules/package/manager/xmake/find_package.lua @@ -83,12 +83,14 @@ function _find_package_from_repo(name, opt) if file:endswith(".lib") or file:endswith(".a") then found = true table.insert(links, target.linkname(path.filename(file))) + table.insert(libfiles, file) end end if not found then for _, file in ipairs(os.files(path.join(installdir, "lib", "*"))) do - if file:endswith(".so") or file:endswith(".dylib") then + if file:endswith(".so") or file:match(".+%.so%..+$") or file:endswith(".dylib") then -- maybe symlink to libxxx.so.1 table.insert(links, target.linkname(path.filename(file))) + table.insert(libfiles, file) end end end @@ -139,7 +141,7 @@ function _find_package_from_repo(name, opt) result.links = table.unique(result.links) end if result.libfiles then - result.libfiles = table.join(result.libfiles, libfiles) + result.libfiles = table.unique(table.join(result.libfiles, libfiles)) end -- inherit the other prefix variables |
