summaryrefslogtreecommitdiff
path: root/xmake/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts')
-rw-r--r--xmake/scripts/base/rule.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/scripts/base/rule.lua b/xmake/scripts/base/rule.lua
index cff18ed16..b8695d418 100644
--- a/xmake/scripts/base/rule.lua
+++ b/xmake/scripts/base/rule.lua
@@ -236,10 +236,14 @@ function rule.headerfiles(target, headerdir)
table.join2(srcheaders, srcpathes)
-- add the destinate headers
- local i = 1
for _, srcpath in ipairs(srcpathes) do
- dstheaders[i] = path.absolute(path.relative(srcpath, rootdir), headerdir)
- i = i + 1
+
+ -- the header
+ local dstheader = path.absolute(path.relative(srcpath, rootdir), headerdir)
+ assert(dstheader)
+
+ -- add it
+ table.insert(dstheaders, dstheader)
end
end
end