Skip to content

Commit

Permalink
fix rpath for #pull/5466
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 22, 2024
1 parent 7f4a287 commit 08eac4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xmake/modules/target/action/install/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function _update_install_rpath(target, opt)
local bindir = target:bindir()
local targetfile = path.join(bindir, target:filename())
if target:policy("install.rpath") then
rpath_utils.clean(targetfile, {plat = target:plat(), arch = target:arch()})
local result, sources = target:get_from("rpathdirs", "*")
if result and sources then
for idx, rpathdirs in ipairs(result) do
Expand All @@ -169,6 +168,8 @@ function _update_install_rpath(target, opt)
local extra = extraconf[rpathdir]
if extra and extra.installonly then
rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
else
rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
end
end
end
Expand Down

0 comments on commit 08eac4b

Please sign in to comment.