summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-22 19:08:48 -0600
committerGitHub <[email protected]>2023-11-22 19:08:48 -0600
commit3789e2356dbd995c6e7952b05f666002d1a8c5ac (patch)
tree93255a64f7866b36a63edd09c7aacd8aa27cda0b
parentc762631ecccd88b2dcac2bfdbff05e79ace925c7 (diff)
Update xmake.lua
-rw-r--r--xmake/rules/swig/xmake.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/rules/swig/xmake.lua b/xmake/rules/swig/xmake.lua
index c073ffb3e..05db9a3a1 100644
--- a/xmake/rules/swig/xmake.lua
+++ b/xmake/rules/swig/xmake.lua
@@ -74,19 +74,19 @@ rule("swig.base")
if fileconfig then
scriptdir = fileconfig.scriptdir
end
- local scriptfile = path.join(target:autogendir(), "rules", "swig")
+ local autogenfiles
+ local autogendir = path.join(target:autogendir(), "rules", "swig")
if moduletype == "python" then
- scriptfile = os.files(scriptfile .. "/*.py")
+ autogenfiles = os.files(path.join(autogendir, "*.py"))
elseif moduletype == "lua" then
- scriptfile = os.files(scriptfile .. "/*.lua")
+ autogenfiles = os.files(path.join(autogendir, "*.lua"))
elseif moduletype == "java" then
- scriptfile = os.files(scriptfile .. "/*.java")
+ autogenfiles = os.files(path.join(autogendir, "*.java"))
end
-
- for _, scriptfile_any in pairs(scriptfile) do
- table.insert(scriptfiles, scriptfile_any)
+ if autogenfiles then
+ table.join2(scriptfiles, autogenfiles)
if scriptdir then
- target:add("installfiles", scriptfile_any, {prefixdir = scriptdir})
+ target:add("installfiles", autogenfiles, {prefixdir = scriptdir})
end
end
end