premake5 how to set outdir based on platform + configuration?
<p>I'd like to set the outdir/targetdir for each combination of platform + configuration.</p>

<pre><code>function SetLibTargetDir(platforms, configs)
for i2,c in ipairs(configs) do
        for i,p in ipairs(platforms) do
            filter ("configurations:" .. c, "platforms:" .. p)
                targetdir("bin/" .. p .. "/" .. c)
                libdirs ("bin/" .. p .. "/" .. c)
                libdirs ("bin_prebuilt/" .. p .. "/" .. c)--manually generated libs/dlls that premake5 can't handle

    end
end
end

SetLibTargetDir({"Win32", "Win64"}, {"Debug", "Release", "Final"})
</code></pre>

<p>I tried using this code, while it gets the config right(debug/release/final). It places everything in Win64, so the 32 bit files &amp; 64 files all end up in the same directory.</p>

<p>What am I doing wrong here? I'd like each combination of platform + configuration to have its own output dir and library paths.</p>

<p>Thanks</p>