diff --git a/Core/project.lua b/Core/project.lua index 84eaa58..ef71c3c 100644 --- a/Core/project.lua +++ b/Core/project.lua @@ -6,34 +6,50 @@ local bugHack = targetingCmake or targetingWindows local kPathPrefix = "!" local function configureProjectForSolution(prj) - filter(auFilterConfig(Aurora.Settings.sNameOfDebug)) + auFilter(auFilterConfig(Aurora.Settings.sNameOfDebug)) defines { "DEBUG" } - targetdir(Aurora.Settings.sAbsCompilerWd .. "/Bin/" .. Aurora.Settings.sNameOfDebug) if (Aurora.Settings.bIsBuildDirWd) then debugdir(Aurora.Settings.sAbsDebug) end flags "NoIncrementalLink" + auFilter {} - filter(auFilterConfig({Aurora.Settings.sNameOfInternal, Aurora.Settings.sNameOfShip})) + auFilter(auFilterConfig({Aurora.Settings.sNameOfInternal, Aurora.Settings.sNameOfShip})) defines { "NDEBUG" } optimize "Speed" + auFilter {} - filter(auFilterConfig(Aurora.Settings.sNameOfInternal)) + auFilter(auFilterConfig(Aurora.Settings.sNameOfInternal)) defines { "STAGING" } - targetdir(Aurora.Settings.sAbsCompilerWd .. "/Bin/" .. Aurora.Settings.sNameOfInternal) if (Aurora.Settings.bIsBuildDirWd) then debugdir(Aurora.Settings.sAbsStage) end flags "NoIncrementalLink" + auFilter {} - filter(auFilterConfig(Aurora.Settings.sNameOfShip)) + auFilter(auFilterConfig(Aurora.Settings.sNameOfShip)) defines { "SHIP" } - targetdir(Aurora.Settings.sAbsCompilerWd .. "/Bin/" .. Aurora.Settings.sNameOfShip) if (Aurora.Settings.bIsBuildDirWd) then debugdir(Aurora.Settings.sAbsShip) end flags "LinkTimeOptimization" - filter {} + auFilter {} + + local function setTargetDir(id) + local name = Aurora.Settings["sNameOf" .. id] + auFilter(auFilterConfig(name)) + defines("AU_CFG_ID_" .. (id:upper())) + local path = Aurora.Settings.sAbsCompilerWd .. "/Bin/" .. name + if (Aurora.Settings.bSplitTargetDirByArch) then + path = path .. "/%{cfg.architecture}" + end + targetdir(path) + auFilter{} + end + + setTargetDir("Debug") + setTargetDir("Internal") + setTargetDir("Ship") auFilterForConfigPlatforms(function(config, platformName, arch) local platform = Aurora.Platforms[platformName] @@ -322,7 +338,7 @@ local function setupProject(prj) cppdialect(Aurora.Settings.sCppVersion) targetprefix(Aurora.Settings.sLibPrefix) - objdir(Aurora.Settings.sAbsCompilerWd .. "/" .. prj.name) + objdir(Aurora.Settings.sAbsCompilerWd .. "/" .. prj.name .. "/%{cfg.architecture}") configureProjectForSolution(prj) configureProjectErrors() diff --git a/Public/settings.lua b/Public/settings.lua index d66d609..85965ab 100644 --- a/Public/settings.lua +++ b/Public/settings.lua @@ -96,6 +96,9 @@ auSetDefault(settings, "bStaticRuntime", true) auSetDefault(settings, "bEditAndCont", false) +auSetDefault(settings, "bSplitTargetDirByArch", false) + + -- Disable common warnings. -- Rationalized as other big projects tend to disable them, builds on linuxs were ugly, and clang and msvc would seethe at different things, and I don't care. -- You should probably turn this off once in a while to check for hidden issues