Skip to content

Commit f329852

Browse files
committed
improve remove rpath
1 parent 08eac4b commit f329852

File tree

1 file changed

+6
-8
lines changed
  • xmake/modules/target/action/install

1 file changed

+6
-8
lines changed

xmake/modules/target/action/install/main.lua

+6-8
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,12 @@ function _update_install_rpath(target, opt)
163163
for idx, rpathdirs in ipairs(result) do
164164
local source = sources[idx]
165165
local extraconf = target:extraconf_from("rpathdirs", source)
166-
if extraconf then
167-
for _, rpathdir in ipairs(rpathdirs) do
168-
local extra = extraconf[rpathdir]
169-
if extra and extra.installonly then
170-
rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
171-
else
172-
rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
173-
end
166+
for _, rpathdir in ipairs(rpathdirs) do
167+
local extra = extraconf and extraconf[rpathdir] or nil
168+
if extra and extra.installonly then
169+
rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
170+
else
171+
rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
174172
end
175173
end
176174
end

0 commit comments

Comments
 (0)