File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,27 @@ rule("swig.base")
71
71
for _ , sourcefile in ipairs (sourcebatch .sourcefiles ) do
72
72
local scriptdir
73
73
local fileconfig = target :fileconfig (sourcefile )
74
+
75
+ local autogenfiles
76
+ local autogendir = path.join (target :autogendir (), " rules" , " swig" )
77
+
74
78
if fileconfig then
75
79
scriptdir = fileconfig .scriptdir
80
+ if fileconfig .swigflags then
81
+ -- find -outdir path
82
+ local idx = - 1
83
+ for i , par in pairs (fileconfig .swigflags ) do
84
+ if par == " -outdir" then
85
+ idx = i
86
+ end
87
+ end
88
+
89
+ if idx > 0 then
90
+ autogendir = fileconfig .swigflags [idx + 1 ]
91
+ end
92
+ end
76
93
end
77
- local autogenfiles
78
- local autogendir = path.join (target :autogendir (), " rules" , " swig" )
94
+
79
95
if moduletype == " python" then
80
96
autogenfiles = os.files (path.join (autogendir , " *.py" ))
81
97
elseif moduletype == " lua" then
You can’t perform that action at this time.
0 commit comments