diff --git a/src/base/config.lua b/src/base/config.lua index 996b3765..39263ed4 100755 --- a/src/base/config.lua +++ b/src/base/config.lua @@ -31,7 +31,14 @@ function config.buildtargetinfo(cfg, kind, field) local basedir = cfg.project.location - local directory = cfg[field.."dir"] or cfg.targetdir or basedir + local targetdir + if cfg.platform then + targetdir = path.join(basedir, 'bin', cfg.platform, cfg.buildcfg) + else + targetdir = path.join(basedir, 'bin', cfg.buildcfg) + end + + local directory = cfg[field.."dir"] or cfg.targetdir or targetdir local basename = cfg[field.."name"] or cfg.targetname or cfg.project.name local prefix = cfg[field.."prefix"] or cfg.targetprefix or ""